[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Cookies



Hi Peter,
On 16 Oct 2010 at 19:09, Peter Slegg wrote:

> I haven't had time to update my kernel for a few weeks
> but I just had a repeat of the cookie issue and the
> cookie cpx shows -31 free.
> 
> Profile shows a large +ve number
> 
> Cookie Jar Configuration
> ~~~~~~~~~~~~~~~~~~~~~~~~
> Cookie jar installed: Yes - at address $  20E000  2154496
> 
> Cookies
> ID      Value        Value    Value
>         (hex)        (asc)    (dec)
> _CPU    $0000003C       <     60
> _FPU    $00100000             1048576
> _VDO    $00040000             262144
> _MCH    $00040000             262144
> _MIL    $00000001             1
> _PCI    $00E06388     àcê     14705544
> MNAM    $00E4A984     ä©ä     14985604
> _SND    $00000024       $     36
> _FDC    $014D494C     MIL     21842252
> _FRB    $00100000             1048576
> _IDT    $0000112E       .     4398
> EURO    $000001DE       Þ     478
> SCSI    $0116F5BC      õ¶     18281916
> HDEX    $001112F8       °     1118968
> USHD    $0011636C      cl     1139564
> XHDI    $0116AB70      ½p     18262896
> _VDI    $0100D16A      Ñj     16830826
> EdDI    $010027EC      'ì     16787436
> McSn    $001C34E0      4à     1848544
> NVDI    $01063B40      ;@     17185600
> FSMC    $0104AEA0      «á     17084064
> EPro    $001F7F3A       :     2064186
> _ISO    $00000000             0
> MiNT    $00000111             273
> _FLK    $00000100             256
> _AKP    $00000003             3
> RSVF    $00210000     !       2162688
> STiK    $011C6608      f      18638344
> LDGM    $01222840     "(@     19015744
> P       $00000400             1024  Non-standard cookie ID
> 
> Cookie jar size = 0  No of cookies (incl NULL) = 31  Free slots = 4294967265
> 
> 
> Report generated on:  October 16, 2010  19:04:14
> PROFILE v2.22 - End of report
> 
This looks like a bug in one of the programs that added a cookie ... possibly 
the last program.  For example, there is a known (to me at least :-)) bug in 
the putcookie() function of the Lattice C library which causes a cookie jar 
overflow to occur when adding a cookie to a full jar.  Any program using 
Lattice C with that buggy function can potentially cause system problems.  And 
any program with home-grown cookie jar manipulation can potentially have 
similar problems.

Since the trickiest part of the cookie jar handling is adding a cookie to a 
full jar, the easiest way to avoid many cookie jar problems is to run a program 
early in the AUTO folder that pre-allocates a cookie jar large enough (e.g. 
with 256 or 512 entries) so that it never has to be re-allocated.  [Each entry 
is only 8 bytes, over-allocating doesn't do much harm :-).]  The program 
JARXXX.PRG from Gribnif Software can do this - let me know if you need a copy.

Roger