RAM Disk always full (100%)

A forum for general AmigaOS 4.x support questions that are not platform-specific
Post Reply
User avatar
samo79
Posts: 572
Joined: Fri Jun 17, 2011 11:13 pm
Location: Italy

RAM Disk always full (100%)

Post by samo79 »

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?
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: RAM Disk always full (100%)

Post by nbache »

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
amifrog
Posts: 37
Joined: Thu Feb 02, 2017 11:12 am

Re: RAM Disk always full (100%)

Post by amifrog »

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.
User avatar
samo79
Posts: 572
Joined: Fri Jun 17, 2011 11:13 pm
Location: Italy

Re: RAM Disk always full (100%)

Post by samo79 »

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
User avatar
colinw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 207
Joined: Mon Aug 15, 2011 9:20 am
Location: Brisbane, QLD. Australia.

Re: RAM Disk always full (100%)

Post by colinw »

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.
User avatar
ktadd
Posts: 48
Joined: Wed Nov 09, 2011 5:50 am

Re: RAM Disk always full (100%)

Post by ktadd »

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
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: RAM Disk always full (100%)

Post by nbache »

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
User avatar
Hypex
Beta Tester
Beta Tester
Posts: 645
Joined: Mon Dec 20, 2010 2:23 pm
Location: Vic. Australia.

Re: RAM Disk always full (100%)

Post by Hypex »

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.
Is 4GB the the upper limit of ExtMem currently?
Post Reply