-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add libc and OW fmemfree wrapper functions and man pages
- Loading branch information
Showing
6 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ OBJS = \ | |
realloc.o \ | ||
sbrk.o \ | ||
fmemalloc.o \ | ||
fmemfree.o \ | ||
|
||
.PHONY: all | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#include <malloc.h> | ||
|
||
/* free from main memory */ | ||
int fmemfree(void __far *ptr) | ||
{ | ||
return _fmemfree((unsigned short)((unsigned long)ptr >> 16)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/**************************************************************************** | ||
* | ||
* Description: ELKS _fmemfree() system call. | ||
* | ||
****************************************************************************/ | ||
|
||
#include <malloc.h> | ||
#include "watcom/syselks.h" | ||
|
||
int _fmemfree( unsigned short __seg ) | ||
{ | ||
syscall_res res = sys_call1( SYS_fmemfree, __seg); | ||
__syscall_return( int, res ); | ||
} |