由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 一个简单的问题
相关主题
菜鸟请教C问题size不固定的struct怎么定义呀?
关于 c malloc的一个问题garbage collecting的语言是不是永远都slow呀
Windows下多个DLL之间memory allocation问题两个面世题
急问:这个为什么不行?A question about class size
奇怪的问题:关于一个简单的malloc()小程序 (转载)C++ Q 108: swap
地址空间里的一个BYTE不能写入(是合法地址)python question, easy one
[合集] dynamic memory 问题求解老魏老姜老霸,我出银子给你们开机器
C puzzle 一日一题java里run curl system command的问题
相关话题的讨论汇总
话题: malloc话题: free话题: system话题: operating话题: bytes
进入Programming版参与讨论
1 (共1页)
e******r
发帖数: 220
1
in C, after malloc, for example:
int* a = malloc(8);
we use free (a) to collect memory back at the end of the running of
the program. For this 'free' command, how does the Operating System know
how many bytes should it free for 'a' at that time? Thanks
R********y
发帖数: 288
2
runtime takes care of that, not the os

of

【在 e******r 的大作中提到】
: in C, after malloc, for example:
: int* a = malloc(8);
: we use free (a) to collect memory back at the end of the running of
: the program. For this 'free' command, how does the Operating System know
: how many bytes should it free for 'a' at that time? Thanks

r*******y
发帖数: 290
3
I head that the length is stored right before the pointer

【在 R********y 的大作中提到】
: runtime takes care of that, not the os
:
: of

1 (共1页)
进入Programming版参与讨论
相关主题
java里run curl system command的问题奇怪的问题:关于一个简单的malloc()小程序 (转载)
ambiguous operators in c++地址空间里的一个BYTE不能写入(是合法地址)
问个函数指针指向操作符的问题[合集] dynamic memory 问题求解
C语言里面的register变量能否进行取地址操作? (转载)C puzzle 一日一题
菜鸟请教C问题size不固定的struct怎么定义呀?
关于 c malloc的一个问题garbage collecting的语言是不是永远都slow呀
Windows下多个DLL之间memory allocation问题两个面世题
急问:这个为什么不行?A question about class size
相关话题的讨论汇总
话题: malloc话题: free话题: system话题: operating话题: bytes