3 ms·
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
by lelf 12y ago
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.
- dzeban 12y ago1M 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.
- throwaway7808 12y ago1M 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