Page MenuHomeFreeBSD

shells/44bsd-csh: remove sbrk use
AbandonedPublic

Authored by brooks on Dec 8 2023, 11:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 21, 10:52 AM
Unknown Object (File)
Mon, Apr 20, 8:48 PM
Unknown Object (File)
Thu, Apr 16, 12:26 AM
Unknown Object (File)
Sat, Apr 11, 4:26 AM
Unknown Object (File)
Sat, Apr 11, 12:07 AM
Unknown Object (File)
Mar 13 2026, 1:05 PM
Unknown Object (File)
Mar 13 2026, 1:02 PM
Unknown Object (File)
Feb 14 2026, 1:24 AM
Subscribers

Details

Reviewers
cy
Summary

The allocator wrappers call sbrk(0) to track heap usage. With modern
malloc implementations this is of little value and sbrk is deprecated so
remove this functionality, but continue to provide a stub implemenation
of the alloc command.

Diff Detail

Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 54876
Build 51765: arc lint + arc unit

Event Timeline

brooks created this revision.

Compiled and minimally smoke tested on an amd64 world without sbrk support.

why is this port still a thing

I'm going to take a different path for ancient tools.

I simply removed the Malloc, Realloc, and Free functions with direct calls to the authoritative libc versions, malloc, etc...