🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.atari.st
Article #25432

Forty folders + Malloc.

#25432
From: Jos Vermaseren
Date: Fri, 06 Mar 1987 12:21
37 lines
2556 bytes

The 40 folder limit turns out to be even more dangerous than we thought.
I have been able to crash on two folders!
The problem is a fixed 6000 bytes buffer from which all internal
allocations are taken. These allocations include:
A basepage for GEMDOS. ( 16 )
Drive information blocks. ( 3 ) + 3*( 4 )
Folder information blocks. ( 4 ) + ( 4 )
File information blocks. ( 4 )
Malloc information. ( 1 )
The numbers in parentheses represent the sizes of the blocks allocated.
For each size a separate pool is kept once a block is given. That is:
once a piece of memory is a block of ( 4 ), it can never be split in
smaller units. A block of size ( i ) occupies 16 * i + 2 bytes.
By malloccing a lot I allocated everything in units of ( 1 ). My next file
operation spoiled my RAM disk ( I am not trying things like this with my
hard disk ). The only 'folders' used were A: and D: !
The address at which ( at least in my ROMS ) the size of the available
memory ( in units of two bytes ) is kept is $5FDE. Keep an eye on it!
The reason that it is called a forty folder limit has mainly to do with
the fact that after closing a folder its entry doesn't get taken from the
list, so until its drive is dismounted, or the folder is deleted it will
keep occupying its space. Having been inside ( roughly ) 40 folders that
are all still in the system ( like on hard disk ) is the most common way
to run into problems, but using Malloc may lower the 40 considerably.
Users of Lattice C don't have this Malloc problem, as lattice doesn't
allow the usage of the GEMDOS Malloc.

Given these problems I don't believe there exists a 'quick hack' to really
solve these limits. The only solution is a rewrite of all internal memory
routines of GEMDOS. I understand that Atari is trying that at the moment.

----------------------------------------------------------------------------
How many DRI types does it take to replace a light bulb?
That too difficult for them. As a kludge they will try to sell you a candle.
----------------------------------------------------------------------------
Technical Details
Message-ID: <256@nikhefh.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcvax!nikhefh!t68

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcvax!nikhefh!t68
From: t68@nikhefh.UUCP (Jos Vermaseren)
Newsgroups: comp.sys.atari.st
Subject: Forty folders + Malloc.
Message-ID: <256@nikhefh.UUCP>
Date: Fri, 6-Mar-87 07:21:31 EST
Article-I.D.: nikhefh.256
Posted: Fri Mar  6 07:21:31 1987
Date-Received: Sun, 8-Mar-87 06:51:57 EST
Organization: Nikhef-H, Amsterdam (the Netherlands).
Lines: 37