Page MenuHomeFreeBSD

lang/smalltalk: use modern memory management
ClosedPublic

Authored by brooks on Dec 8 2023, 10:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 18 2024, 4:15 PM
Unknown Object (File)
Dec 30 2023, 10:42 PM
Unknown Object (File)
Dec 23 2023, 4:14 AM
Unknown Object (File)
Dec 11 2023, 6:13 PM
Subscribers
None

Details

Summary

The memory allocator defaults to some horrifying complex code to manage
mmap'd allocations. On system where MAP_NORESERVE is defined (Linux) it
uses a much simpler approach relying on memory overcommit. Enable this
code on FreeBSD by defining MAP_NORESERVE to 0 (all allocations
are MAP_NORESERVE on FreeBSD unless a sysctl is set).

Entierly disable the other code path as it (somewhat gratutiously) uses
sbrk.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

brooks created this revision.

I've built and tested this to the level of running hello world on an amd64 build without sbrk.

@brooks wrote:

The memory allocator defaults to some horrifying complex code to manage mmap'd allocations.

Thank you for doing this Brooks, much appreciated! I've tried this myself back in summer but was demotivated by this horrible complexity and didn't complete the quest.

I've built and tested this to the level of running hello world on an amd64 build without sbrk(2).

Good enough for me, please go ahead and commit.

This revision is now accepted and ready to land.Dec 9 2023, 4:02 PM