C和指针课后问答题答案翻译

第11章 动态内存分配

1.在你的系统中,你能够声明的静态数组最大长度能达到多少?使用动态内存分配,你最大能够获取的内存块有多大?

英文答案原文:

This will vary from system to system.There are several things that may affect the result on PC-based systems, includeing the memory model in use, the amount of space in the data and/or stack segment, the amount of available memory on the system, and so forth. The result on Unix systems will depend on the amount of available swap space, among other things.

答案中文翻译:

根据系统不同而值不同。以下是影响基于PC系统的因素:使用的内存模式、数据段或栈段的空闲量、系统上可用内存量等。Unix系统上,取决于可用的交换空间大小。

2.当你一次请求分配500个字节的内存时,实际上获得的动态分配的内存数量总共有多大?当你一次请求分配5000个字节时又如何?它们存在区别吗?如果有,你如何解释?

英文答案原文:

There are two explanations possible.Requesting smaller chunks may allow more memory to be allocated because the amount of memory left over after the last alloc

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值