General discussion

Locked

C: Memory allocation function

By bfishell ·
Is there a memory allocation function in ANSI C that would allow the programmer to suggest where in memory to write?

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

C: Memory allocation function

by clarkmk In reply to C: Memory allocation func ...

There is no form of malloc() which allows you to specify where to write in memory. Dynamic memory allocation to the heap is managed by algorithms in the operating system, and may vary by OS.

If you want to specify direct writes to specified memory addresses, you will need to have detailed knowlege of the memory allocation methods used by your operating system. Otherwise you could clobber executable code or data, which would be bad.

Collapse -

C: Memory allocation function

by bfishell In reply to C: Memory allocation func ...

Poster rated this answer

Collapse -

C: Memory allocation function

by bfishell In reply to C: Memory allocation func ...

This question was closed by the author

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums