Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[kernel,libc] Add _fmemfree system call and wrapper functions #2106

Merged
merged 5 commits into from
Nov 18, 2024
Merged

Conversation

ghaerr
Copy link
Owner

@ghaerr ghaerr commented Nov 18, 2024

Adds the ability to free memory allocated by fmemalloc. This will likely be required for large/huge memory allocations for the JWasm port in #2103. Supports ELKS and OWC compilers/libraries.

Usage:

#include <stdlib.h>
...
    char __far *p = fmemalloc(0x10000L);  // allocate 64K of main memory
...
    fmemfree(p); // free 64k memory

Updates fmemalloc man pages in sections 2 and 3.
Also adds _HShift global for OWC huge pointer support, required in pia.asm.

@ghaerr ghaerr merged commit 6df0e7d into master Nov 18, 2024
1 check passed
@ghaerr ghaerr deleted the fmemfree branch November 18, 2024 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant