- 博客(4)
- 资源 (9)
- 收藏
- 关注
原创 The Linux Programming Interface 笔记之malloc和free的实现
Although malloc() and free() provide an interface for allocating memory that is much easier to use than brk() and sbrk(), it is still possible to make various programming errors when using them.
2017-02-04 23:20:20 656
转载 off-by-one(大小差一)错误介绍
详细了解请移步这里 off-by-one,大小差一错误是一类常见的程序设计错误。这方面有一个经典的例子OpenSSH.去Google搜索关键词“OpenSSH off-by-one”可以了解相关状况。具体来说, 1. if(id channels_alloc)... 2. if(id = channels_alloc)... 第二句应该是正确的写法。举个更通俗的例子: int a
2017-02-04 22:55:09 2390 2
原创 当进程退出后,动态申请的内存会自动释放吗
stackoverflow有人问了这么一个问题,下面这段程序执行完毕后,malloc的内存会释放吗 int main () { int *p = malloc(10 * sizeof *p); *p = 42; return 0; //Exiting without freeing the allocated memory } 赞数最多的这么回答: It depends
2017-02-04 20:50:03 12863
Hands.On.Machine.Learning.with.Scikit.Learn.and.TensorFlow
2017-11-07
Deep Learning 英文原版
2017-11-05
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人