sholsapp / gallocy

A distributed shared memory infrastructure.
27 stars 9 forks source link

Design external API using mmap/sbrk #25

Closed sholsapp closed 8 years ago

sholsapp commented 8 years ago

Instead of continuing to invest in providing an entire memory allocator implementation, we might be better of focusing solely on the operating system's interface to memory: sbrk, mmap. This would allow us to swap out implementations for these methods, and leave the system allocator in tact.

sholsapp commented 8 years ago

This might actually be a more correct way to implement the allocator, too, since applications would subvert the DSM by using sbrk or mmap directly. By implementing this external API, we would handle manual use of the operating system memory interface correctly.

sholsapp commented 8 years ago

I did some research on this and learned that the standard library's implementation of malloc binds to its internal implementations of mmap and sbrk, so (it looks like) there is no chance of replacing mmap and sbrk in hopes of reusing the standard library's malloc.

This doesn't consider compiling our own libc, though.

sholsapp commented 8 years ago

I'm closing as "wont fix" since this seems to be impossible. I think we're going to look into https://github.com/sholsapp/gallocy/issues/30.