×

Loading...

The answer is machine (CPU type) and operating system related

old (HH)
The answer is machine (CPU type) and operating system related. For DOS (of course Intel CPU), you can directly assign the absolute address of the block of memory to the memory pointer. For a near pointer, just offset need to be assigned. For a far pointer, both offset and segment. However you should code to protect the block of memory allocated in this way.
(#46076@0)
2001-4-15 -04:00
This post has been archived. It cannot be replied.
Page address has been copied. To share, click to copy page address.
Share Online by QR Code

Back To Topic: 请问用C如何动态分配一个数组,其内存首地址由参数制定。我是象汇编那样用指针直接访问内存。有相关的函数可以调用么? malloc, calloc 好象不能指定地址。

Back To Forum: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论