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)
Sat, Feb 14, 1:24 AM
Unknown Object (File)
Tue, Feb 10, 5:10 PM
Unknown Object (File)
Tue, Feb 10, 3:04 PM
Unknown Object (File)
Sun, Feb 8, 9:31 PM
Unknown Object (File)
Jan 16 2026, 7:06 AM
Unknown Object (File)
Dec 19 2025, 8:35 AM
Unknown Object (File)
Nov 29 2025, 9:43 PM
Unknown Object (File)
Nov 18 2025, 10:31 PM
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...