2 ms·
For assignments such as this which primitives are the student expected to use? mmap & munmap? Or are they given a flat chunk of memory? Or a chunk of memory tha
by im3w1l 9y ago
For assignments such as this which primitives are the student expected to use? mmap & munmap?
Or are they given a flat chunk of memory? Or a chunk of memory that can grow on one end?
- pjmlp 9y agoDepends I guess. At technical school, using MS-DOS, we used a chunk of memory static dimensioned at compile time. A couple of years later at the university, on UNIX systems, brk().
- flafla2 9y agoGenerally sbrk [1] is used to extend heap memory. The heap is then modified directly using clever pointer arithmetic. Source: I did this lab a month ago at CMU :) [1] https://linux.die.net/man/2/sbrk https://linux.die.net/man/2/sbrk