随笔分类 -  darknet源码

摘要:C标准函数库中,常见的堆上内存管理函数有malloc(), calloc(), recalloc(), free(), memset。 之所以使用堆,是因为栈只能用来保存临时变量、局部变量和函数参数。在函数返回时,自动释放所占用的存储空间。而堆上的内存空间不会自动释放,直到调用free()函数,才会 阅读全文
posted @ 2022-02-23 15:38 方诚 阅读(200) 评论(0) 推荐(0)
摘要:创建列表 typedef struct node{ void *val; struct node *next; struct node *prev; } node; typedef struct list{ int size; node *front; node *back; } list; voi 阅读全文
posted @ 2022-02-23 14:09 方诚 阅读(58) 评论(0) 推荐(0)