Is there a reason why the RAM Disk dir appeared to be always full at 100% ?
Atleast this is what the window title says ... it is a bug?
RAM Disk always full (100%)
- nbache
- Beta Tester
- Posts: 1716
- Joined: Mon Dec 20, 2010 7:25 pm
- Location: Copenhagen, Denmark
- Contact:
Re: RAM Disk always full (100%)
It's because it *is* actually always full - in the sense that it never uses more space than what is needed to hold its contents.
If it should be anything else but full, you'd have to decide what size it should have to measure the contents against; e.g. if it had a size of 1 GB, and you had 0.5 GB in it, it would be 50% full.
But RAM disk doesn't work like that, it just expands when needed and shrinks when possible.
Best regards,
Niels
If it should be anything else but full, you'd have to decide what size it should have to measure the contents against; e.g. if it had a size of 1 GB, and you had 0.5 GB in it, it would be 50% full.
But RAM disk doesn't work like that, it just expands when needed and shrinks when possible.
Best regards,
Niels
Re: RAM Disk always full (100%)
Well, the latest 3.x updates changed this behavior completely. The Ram Disk now consists of all free RAM and shows the percentage used relative to the total amount available.
Re: RAM Disk always full (100%)
Well sounds more logical as it has been rethought on AmigaOS 3.2...
Ok we understood that effectly it isn't a bug but only a different way of interpreting it... maybe we could open a ticket asking to implement it optionally even on AmigaOS4?
Btw Thomas Richter created a patch for OS 3.9 in 2002
http://aminet.net/package/util/boot/PatchRAM
Ok we understood that effectly it isn't a bug but only a different way of interpreting it... maybe we could open a ticket asking to implement it optionally even on AmigaOS4?
Btw Thomas Richter created a patch for OS 3.9 in 2002
http://aminet.net/package/util/boot/PatchRAM
- colinw
- AmigaOS Core Developer
- Posts: 207
- Joined: Mon Aug 15, 2011 9:20 am
- Location: Brisbane, QLD. Australia.
Re: RAM Disk always full (100%)
Unfortunatly this is not going to work for two reasons.
1) Exec uses memory pools basically everywhere, even a plain AllocVec() comes from a pool,
and the amount of memory from AvailMem() does not reflect the amount of memory actually
available, only free (unused) memory.
On a low memory expunge, the pools are flushed and unused libraries are released to
free up held memory, how much of this will release, is indeterminant at any given time.
2) OS4 ram-handler has the ability to use ExtMem, which means that your disk can have
more space than the rest of the normal memory can show in the low 4 gig address space,
with new kernels, this will hopefully expand to the actual amount of physical memory
installed, so a new machine could in effect have terrabytes of ram for use with programs
using ExtMem, (like the ram disk), but right now you are limited to 4 gig for reasons
I won't go into here.
I'm sure it may be possible to cook up some sort of maximum available figure, but from moment
to moment it can never be anywhere near accurate, trying to do so would require considerable
code peeking into nasty places to find out where it's all hiding, it's not worth it.
1) Exec uses memory pools basically everywhere, even a plain AllocVec() comes from a pool,
and the amount of memory from AvailMem() does not reflect the amount of memory actually
available, only free (unused) memory.
On a low memory expunge, the pools are flushed and unused libraries are released to
free up held memory, how much of this will release, is indeterminant at any given time.
2) OS4 ram-handler has the ability to use ExtMem, which means that your disk can have
more space than the rest of the normal memory can show in the low 4 gig address space,
with new kernels, this will hopefully expand to the actual amount of physical memory
installed, so a new machine could in effect have terrabytes of ram for use with programs
using ExtMem, (like the ram disk), but right now you are limited to 4 gig for reasons
I won't go into here.
I'm sure it may be possible to cook up some sort of maximum available figure, but from moment
to moment it can never be anywhere near accurate, trying to do so would require considerable
code peeking into nasty places to find out where it's all hiding, it's not worth it.
Re: RAM Disk always full (100%)
Personally I'd rather not sacrafice the overhead, as small as it might be, of ramdisk device constantly monitoring the available memory. I already have a comodity that displays the available ram in the title bar.
Kevin - X1000 first contact / uA1
- nbache
- Beta Tester
- Posts: 1716
- Joined: Mon Dec 20, 2010 7:25 pm
- Location: Copenhagen, Denmark
- Contact:
Re: RAM Disk always full (100%)
I agree. Usually, if for some odd reason I want to know how much memory seems to be free and usable, for instance for putting stuff into my RAM disk, I just click on WB's background and look at the screen title.
BTW, there's also the matter of swapping memory to disk. I know it's not so useful for most of us now, because we already have 2 GB of RAM (or more), but who's to say there won't in the future be an enhanced swap feature which can swap much more?
Perhaps we should, in spite of the name, simply learn to look upon the RAM disk as not a disk in the conventional sense (having a defined size/capacity), but more like a data balloon or something .
Best regards,
Niels
BTW, there's also the matter of swapping memory to disk. I know it's not so useful for most of us now, because we already have 2 GB of RAM (or more), but who's to say there won't in the future be an enhanced swap feature which can swap much more?
Perhaps we should, in spite of the name, simply learn to look upon the RAM disk as not a disk in the conventional sense (having a defined size/capacity), but more like a data balloon or something .
Best regards,
Niels
Re: RAM Disk always full (100%)
Is 4GB the the upper limit of ExtMem currently?colinw wrote: ↑Thu Aug 18, 2022 1:57 am 2) OS4 ram-handler has the ability to use ExtMem, which means that your disk can have
more space than the rest of the normal memory can show in the low 4 gig address space,
with new kernels, this will hopefully expand to the actual amount of physical memory
installed, so a new machine could in effect have terrabytes of ram for use with programs
using ExtMem, (like the ram disk), but right now you are limited to 4 gig for reasons
I won't go into here.