*** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@1010 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d728c2d559
commit
c7e1548cf4
12 changed files with 111 additions and 207 deletions
|
|
@ -36,7 +36,7 @@ int wad_memory_init() {
|
|||
pagesize = getpagesize();
|
||||
devzero = open("/dev/zero", O_RDWR);
|
||||
if (devzero < 0) {
|
||||
printf("WAD: couldn't open /dev/zero.\n");
|
||||
wad_printf("WAD: couldn't open /dev/zero.\n");
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -70,7 +70,7 @@ void *wad_malloc(int nbytes) {
|
|||
WadMemory *wm;
|
||||
char *c;
|
||||
int npages;
|
||||
printf("wad_malloc: %d\n", nbytes);
|
||||
/* wad_printf("wad_malloc: %d\n", nbytes); */
|
||||
if (nbytes >= (pagesize >> 2)) {
|
||||
/* Large allocation. */
|
||||
npages = ((nbytes + sizeof(WadMemory))/pagesize) + 1;
|
||||
|
|
@ -94,6 +94,7 @@ void *wad_malloc(int nbytes) {
|
|||
}
|
||||
}
|
||||
if (!wm) {
|
||||
wad_printf("wad_malloc: new page\n", nbytes);
|
||||
wm = (WadMemory *) wad_page_alloc(1);
|
||||
if (!wm) return 0;
|
||||
wm->npages = 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue