Discussion:
How do we figure out if the sector is empty for the page file
(too old to reply)
zhe
2005-04-05 09:12:48 UTC
Permalink
One we located the page file, how do we actually determine is the sector is
free? the pageFile->dev->inUse is a boolean variable, does that indicate the
particular sector is free to use?

Thanks

Zhe
Iulian Neamtiu
2005-04-05 14:52:42 UTC
Permalink
Unfortunately it's not that easy. You need to manage space in the paging
file yourself. See my post "Re: Still confused with INIT_PAGING" on 03/31.

pageFile->dev->inUse is only used internally by the I/O system, it's of
no use to you.

Iulian
Post by zhe
One we located the page file, how do we actually determine is the sector is
free? the pageFile->dev->inUse is a boolean variable, does that indicate the
particular sector is free to use?
Thanks
Zhe
zhe
2005-04-05 23:33:56 UTC
Permalink
I looked around in the mem.c, and found that when I run the geekos, the
program initialize a pagefile.bin for me, and it is large enough to store
256 pages, and I can check whether a particular page is empty or not, do you
think I can just use the file created by GeekOS or I have to setup another
one?

Thanks

Zhe Liu

Loading...