mirror of
https://github.com/dschmenk/PLASMA.git
synced 2025-01-10 06:30:41 +00:00
Use fileio module for memmgr
This commit is contained in:
parent
e9191c20d8
commit
0ef28e7557
6
src/libsrc/memmgr.pla
Normal file → Executable file
6
src/libsrc/memmgr.pla
Normal file → Executable file
@ -384,7 +384,7 @@ def swapin(hmem)
|
||||
// Swap this block back in
|
||||
//
|
||||
swapfile(@filename, hmem)
|
||||
get_info(@filename, @info)
|
||||
getfileinfo(@filename, @info)
|
||||
size = info:2 // Size encoded in aux type
|
||||
memblk = findblk(size)
|
||||
//puts(@swapinstr);puts(@filename);putc('@');puth(memblk);putc(':');puth(size);putln
|
||||
@ -663,7 +663,7 @@ initdata=>volparms.0 = 2
|
||||
initdata=>volparms.1 = 0
|
||||
initdata=>volparms:2 = sysbuf
|
||||
syscall($C5, @initdata=>volparms)
|
||||
initdata=>volptr = iobuffer
|
||||
initdata=>volptr = sysbuf
|
||||
initdata=>ramfree = 0
|
||||
initdata=>bestfree = 0
|
||||
for sweepen = 0 to 15
|
||||
@ -671,7 +671,7 @@ for sweepen = 0 to 15
|
||||
if ^initdata=>volptr
|
||||
memcpy(@swapvol + 2, initdata=>volptr + 1, ^initdata=>volptr)
|
||||
swapvol = ^initdata=>volptr + 1
|
||||
get_info(@swapvol, @initdata->volinfo)
|
||||
getfileinfo(@swapvol, @initdata->volinfo)
|
||||
initdata=>freeblks = initdata=>volinfo:2 - initdata=>volinfo:5
|
||||
if initdata=>volptr:1 == $522F and initdata=>volptr:3 == $4D41 // '/RAM'
|
||||
if isugt(initdata=>freeblks, initdata=>ramfree)
|
||||
|
Loading…
x
Reference in New Issue
Block a user