Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] mem2.r

From: rotenca::telvia::it at: 9-Oct-2001 16:24

I have uploaded in the rebol library "mem2.r" with a set of functions to test memory usage of everything in rebol. I should like to know bug and some results on differents OS. I use W98. The first things i have discovered is that everything use 16 bytes of memory (even a char) because everything is in a block and every position in a block use 16 bytes. A void block ([]) is 32 bytes. A simple path (a/b) is 112 bytes. A function like help allocates 29040 bytes. func [][] allocates 288 bytes. use [][] allocates 224 bytes make object! [] allocates 176 bytes A string of len 0 and a string of len 13 uses the same memory, from 14 to 29 the memory used is the same, then there is another allocation of 16 bytes and so on, so the first 3 byte are used for something else. Analog behaviour for issue and others dataypes. Rebol is 16byte dependent, at least under w98 but i do not think this change from os to os. --- Ciao Romano