News for hackers. Stuff that matters.
Re:Restricting program memory by lelf on Tuesday November 25, 2014 @09:21AM (#8657794)
There are problems on many accounts: you can forget all the dance around the heap, — malloc can (it sometimes will) just use mmap; catching malloc is not enough, you can directly mmap, or, and there's perfectly a fine stack you can utilize for 1M; you cannot restrict memory space because necessary libraries take considerate to 1M amount.

TL;DR: 1M is too small to do it.

Re:Restricting program memory by dzeban on Tuesday November 25, 2014 @10:18AM (#8658024)
1M is too small for what? For sorting? Dunno, will see next time when try to implement external merge sort :-). Too small for the whole program? Of course, it won't load runtime - I've shown it in container and qemu parts.
Re:Restricting program memory by throwaway7808 on Tuesday November 25, 2014 @01:23PM (#8658897)
1M is sometimes all the memory that you have, on the embedded systems. And sometimes it is less. For example, it could be 68 bytes.

PIC 16F84A - 1K Program Memory, 68 bytes Data Memory, 64 bytes EEPROM