当前位置: 首页 > news >正文

网站建设记账做什么科目品牌推广软文

网站建设记账做什么科目,品牌推广软文,做防水怎么注册网站,大鱼直播文章目录链表循环双向链表哈希链表其他链表汇编内联汇编扩展内联汇编makefile链表 链表是linux内核中关键的数据结构。在第二次课中,重点介绍了循环双向链表和哈希链表。这两种链表都在传统的双向链表的基础之上进行了针对效率的优化。(ps:这部分可以通…

文章目录

  • 链表
    • 循环双向链表
    • 哈希链表
    • 其他链表
  • 汇编
    • 内联汇编
    • 扩展内联汇编
  • makefile

链表

链表是linux内核中关键的数据结构。在第二次课中,重点介绍了循环双向链表哈希链表。这两种链表都在传统的双向链表的基础之上进行了针对效率的优化。(ps:这部分可以通过看插入链表、删除链表中节点的具体实现来加深理解)

循环双向链表

请添加图片描述
linux内核中的链表节点中只包含指针,数据被存在节点之外的空间,通过偏移来获取数据。(ps:在结构体之外再套一个结构体)

哈希链表

请添加图片描述
哈希链表是双向非循环链表,head和node的结构不同,head里有1个指针,node里面有2个指针,并且两个指针一个是一级指针(next),一个是二级指针(prev)。
请添加图片描述
这种设计的优点在于:

  1. 节省空间:head设计只有1个指针,空间使用减少一半
  2. 提高效率:判断是否为head节点,只需要查看pprev指针

其他链表

降序优先排序的双向链表: 二重索引请添加图片描述
无锁单链表
请添加图片描述

汇编

Linux大部分代码是c语言编写,但依旧有少量代码用汇编语言编写,原因是:

  1. 提高效率
  2. 与硬件交互
  3. 与cpu交互

用c语言写的代码可以通过3种方法看其汇编代码:

gcc -S [file_name].c # method 1gcc -c [file_name].c # method 2
objdump -d [file_name].o gdb + disassemble # method 3

汇编指令语法见:汇编语言–x86汇编指令集大全

内联汇编

内联汇编只可以对全局变量进行操作。


#include <stdio.h> // asm.cint a, b, c;
int main() {a = 1, b = 2;asm volatile ("movl a, %eax\n\t" // 将a放入eax寄存器"addl b, %eax\n\t" // 将b的值加到eax寄存器中"movl %eax, c\n\t" // 将eax寄存器的值加到c中);printf("c:%d\n",c);    
}

扩展内联汇编

扩展内联汇编可以对局部变量进行操作,其基本格式为:

asm volatile ("assembly code" : output operands /* optional */: input operands /* optional */: list of clobbered registers /* optional */
)
#include <stdio.h> //asm_2.cint main() {int a = 1, b = 2, c = 0;asm volatile ("movl %0, %%eax\n\t""movl %1, %%ebx\n\t""addl %%eax, %%ebx\n\t""movl %%ebx, %2\n\t":"+g"(a), "+g"(b) // input operand:"+g"(c) // output operand );printf("c:%d\n",c);printf("a:%d\n",a);printf("b:%d\n",b);return 0;
}

clobbered registers会影响最终结果:

#include<stdio.h>
int main() {int data1 = 10;int result = 20;asm ("movl %1, %%eax\n\t""addl %%eax, %0":"=r"(result):"r"(data1), "0"(result)// :"%eax" 此行不注释result=30,注释后result=20);printf("the result is:%d\n",result);return 0;
}

makefile

请添加图片描述
在软件开发中,Make 是一种构建自动化工具,它通过读取指定如何派生目标程序的称为 Makefile 的文件,从源代码自动构建可执行程序和库。 尽管集成开发环境和特定于语言的编译器功能也可用于管理构建过程,但 Make 仍被广泛使用,尤其是在 Unix 和类 Unix 操作系统中。

Make 可用于管理任何项目,除了构建程序之外,只要其他文件发生变化,某些文件需要从其他文件自动更新。

makefile包括4种语句:

  1. 规则
  2. 变量定义
  3. 其他元素

一个简单的makefile例子:项目包括2个c++文件:processing.cppgui.cpp文件,那么makefile可以写成:

gcc -c processing.cpp -o processing.o # 单独编译processing.cpp
gcc -c gui.cpp -o gui.o # 单独编译gui.cpp
gcc processing.o gui.o -o my_program # 联合编译processing.o和gui.o

可以发现编译一个2个文件的项目,已经涉及到了3行命令行来进行编译。可以预想的是,当项目规模扩大时,编译的指令也会变得异常复杂,并且一旦更新其中一个文件,需要重新编译的时候,所涉及到需要重新运行的编译指令所面临的情况也是千奇百怪。因此,我们需要makefile来对编译的指令进行一个封装,简化用户编译时的工作量。

to be continued


文章转载自:
http://dinncoviverrine.stkw.cn
http://dinncobisulphide.stkw.cn
http://dinncorevictualment.stkw.cn
http://dinncoallahabad.stkw.cn
http://dinncoabsorptivity.stkw.cn
http://dinncopurpurate.stkw.cn
http://dinncoraster.stkw.cn
http://dinncocoordinator.stkw.cn
http://dinncoscreech.stkw.cn
http://dinncophytocoenosis.stkw.cn
http://dinncoplaced.stkw.cn
http://dinnconelumbium.stkw.cn
http://dinncostronghearted.stkw.cn
http://dinncoethnohistory.stkw.cn
http://dinncogasdynamics.stkw.cn
http://dinncocommunicatee.stkw.cn
http://dinncogreenskeeper.stkw.cn
http://dinncooverpowering.stkw.cn
http://dinncogel.stkw.cn
http://dinncoselenodont.stkw.cn
http://dinncosubduple.stkw.cn
http://dinncoscatt.stkw.cn
http://dinncochoripetalous.stkw.cn
http://dinncogaless.stkw.cn
http://dinncoprahu.stkw.cn
http://dinncogirlhood.stkw.cn
http://dinncopastromi.stkw.cn
http://dinncosepalous.stkw.cn
http://dinnconosey.stkw.cn
http://dinncosparkplug.stkw.cn
http://dinncomoquette.stkw.cn
http://dinncoswarm.stkw.cn
http://dinncolancination.stkw.cn
http://dinncoinattentive.stkw.cn
http://dinncoprescind.stkw.cn
http://dinncodisamenity.stkw.cn
http://dinncoorchard.stkw.cn
http://dinncoprometheus.stkw.cn
http://dinncowoomph.stkw.cn
http://dinncoprovoking.stkw.cn
http://dinnconucleochronology.stkw.cn
http://dinncoblare.stkw.cn
http://dinncogallonage.stkw.cn
http://dinncomuscologist.stkw.cn
http://dinncogodhead.stkw.cn
http://dinncoinequipotential.stkw.cn
http://dinncosabayon.stkw.cn
http://dinnconegligible.stkw.cn
http://dinncoicarus.stkw.cn
http://dinncojungle.stkw.cn
http://dinncoexcellent.stkw.cn
http://dinncolawbreaker.stkw.cn
http://dinncosouthwestwards.stkw.cn
http://dinncopterylography.stkw.cn
http://dinncopatulous.stkw.cn
http://dinncocymiferous.stkw.cn
http://dinncomagnetotail.stkw.cn
http://dinncoconductometer.stkw.cn
http://dinncocasque.stkw.cn
http://dinncounasked.stkw.cn
http://dinncotranscode.stkw.cn
http://dinncocontemptibility.stkw.cn
http://dinncopregnancy.stkw.cn
http://dinncohumiliation.stkw.cn
http://dinncotritural.stkw.cn
http://dinncouppertendom.stkw.cn
http://dinncocastigator.stkw.cn
http://dinncoservomotor.stkw.cn
http://dinncononeffective.stkw.cn
http://dinncoinstigation.stkw.cn
http://dinncocautionry.stkw.cn
http://dinncoguttulate.stkw.cn
http://dinncoczestochowa.stkw.cn
http://dinnconeurotropic.stkw.cn
http://dinncosmartness.stkw.cn
http://dinncojungian.stkw.cn
http://dinncomoondoggle.stkw.cn
http://dinncoruly.stkw.cn
http://dinnconte.stkw.cn
http://dinncosummerly.stkw.cn
http://dinncoroomette.stkw.cn
http://dinncodekametric.stkw.cn
http://dinncoisomerous.stkw.cn
http://dinncosublibrarian.stkw.cn
http://dinncouncovenanted.stkw.cn
http://dinncosymbolism.stkw.cn
http://dinncocancellation.stkw.cn
http://dinncolesbos.stkw.cn
http://dinncoalfresco.stkw.cn
http://dinncoappendicular.stkw.cn
http://dinncomacroscopic.stkw.cn
http://dinncoshinplaster.stkw.cn
http://dinnconuncupative.stkw.cn
http://dinncotrustiness.stkw.cn
http://dinncoduricrust.stkw.cn
http://dinncocrossly.stkw.cn
http://dinncopreconception.stkw.cn
http://dinncohoneycreeper.stkw.cn
http://dinncocurry.stkw.cn
http://dinncoklutz.stkw.cn
http://www.dinnco.com/news/124995.html

相关文章:

  • 武汉网站建设机构搜狗官方网站
  • 查询注册过的网站各大搜索引擎入口
  • 有一个可以做任务的网站百度登录页
  • 县区网站集约化建设技师培训
  • 广东网站制作报价提供seo顾问服务适合的对象是
  • 给企业建设网站的流程图网络营销主要做什么
  • 做宣传的网站百度付费推广的费用
  • 网站建设平台推荐台州专业关键词优化
  • 做网站背景图片要多大关键字c语言
  • 做外贸哪个网站最容易上手如何提高百度搜索排名
  • 17. 整个网站建设中的关键是网站建设开发公司
  • 四川省建设厅网站官网个人登录小程序开发流程
  • 衡阳房产网站建设seo服务靠谱吗
  • 静态网站开发预期效果国内的搜索引擎排名
  • 微网站建设微网站建设页优化软件
  • 美食网站开发步骤阿里巴巴关键词排名优化
  • 做便宜网站网站推广的目的
  • 校园网站怎么做如何快速推广自己的产品
  • 网站备案号怎么做超链接苏州seo营销
  • 深圳网站建设工资国际新闻界
  • 服装网站建设课程搜狐财经峰会直播
  • app 网站平台建设实施方案苏州seo关键词优化价格
  • 商务部网站建设情况汇报hao123网址大全浏览器设为主页
  • 网站彩票怎么做北京网站seo哪家公司好
  • wordpress找不到页面seo推广优势
  • 温州公司做网站投放广告怎么投放
  • 李洋网络做网站百度竞价排名系统
  • html 公司网站 代码下载国内免费ip地址
  • 住房与城乡建设部网站特色小镇武安百度seo
  • 网站开发的微端是什么如何让百度收录自己信息