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)
Fri, Jun 28, 10:49 PM
Unknown Object (File)
Jun 26 2024, 7:29 PM
Unknown Object (File)
Jun 26 2024, 7:04 PM
Unknown Object (File)
Jun 26 2024, 5:20 PM
Unknown Object (File)
Jun 10 2024, 12:15 AM
Unknown Object (File)
Jun 10 2024, 12:15 AM
Unknown Object (File)
Jun 10 2024, 12:15 AM
Unknown Object (File)
Jun 10 2024, 12:15 AM
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