Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Application questions and support => Topic started by: Bitwinter on February 17, 2016, 09:18:22 PM

Title: Classic OS- Dataypes, Libraries and Memory question
Post by: Bitwinter on February 17, 2016, 09:18:22 PM
Hello!

Returning now to this fun platform after a 20 year absence!

So- I remember doing this then and find myself doing it now..
I put A LOT of libraries and datatypes in the DEVS and LIBS folder.

My question is this - Are these loaded on boot and taking up system RAM ? or are they only accessed "as needed".

I would think that the 68040.library would be used all the time- but there are some others that i would expect need not run until they are called (like dopus.library). Same things go for datatypes...if I am not opening up an mpeg does having the datatype in the devs folder actually use memory ?

thanks!
Title: Re: Classic OS- Dataypes, Libraries and Memory question
Post by: lionstorm on February 17, 2016, 09:29:56 PM
not sure but you can install env-handler that will load stuff as necessary : http://aminet.net/package/util/sys/envhandler
Title: Re: Classic OS- Dataypes, Libraries and Memory question
Post by: Oldsmobile_Mike on February 17, 2016, 09:30:25 PM
Libraries are only used when they're accessed (that's why there's the handy 'flushlibs' command (http://wiki.amigaos.net/wiki/Debug_Menu_-_Flush_libs).  "Developers only" my a**, I've used it all the time for years).  Devices (that are mounted) are used all the time.  They use however much memory you've assigned them as a buffer, plus a little bit more.

Also +1 for Env-Handler, for all your stuff in ENVARC: / ENV:.

Obviously a lot of variables depending on version of the OS, which processor, etc.  Cheers, and welcome to the forum!  :D
Title: Re: Classic OS- Dataypes, Libraries and Memory question
Post by: guest11527 on February 18, 2016, 06:44:47 AM
Quote from: Bitwinter;804177
My question is this - Are these loaded on boot and taking up system RAM ? or are they only accessed "as needed".
They are loaded as needed, i.e the latter. A library not used does not take system ram.

Quote from: Bitwinter;804177
I would think that the 68040.library would be used all the time
If you have an 68040 on board, yes. Otherwise, no.



Quote from: Bitwinter;804177
Same things go for datatypes...if I am not opening up an mpeg does having the datatype in the devs folder actually use memory ?

It will be loaded once the system needs it, and then will be loaded to system ram. When it is decoding a codestream, it will take additional RAM for the codestream. This Ram is returned (hopefully) once the job is done, though the datatype will be kept in RAM until the system runs low on memory. At this stage, it will be flushed out to make room for more important resources.

I.e., it makes no sense *not* to put additional libraries and datatypes on the system. As long as they are not needed, they don't add to the system RAM. Plus, they will be removed from the system ram if running low on memory.