discuss-gnustep
[Top][All Lists]
Advanced

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

question about GNUstep memmory consumption


From: Fredo
Subject: question about GNUstep memmory consumption
Date: Wed, 01 Nov 2000 19:00:56 +0000

Hello,

I have written a basic test to evaluate GNUstep memory usage:

        int i = 0;
        id pool = [NSAutoreleasePool new];
        for ( i = 0; i < 100000; i++ )
        {
                [NSNumber numberWithInt:i];
        }
        sleep( 10 );
        [pool release];

The process size, in bytes, grow from 35127296 up to 43581440.
This give an approximate size of 84 bytes / NSIntNumber (concrete class
for int type).

In the same time, the following code gives a size of 8 bytes /
NSIntNumber.
NSLog( @"sizeof(NSIntNumber:%i)\n", class_get_instance_size(
[NSIntNumber class] ) );

I have two questions:
1. Is this correct?
2. what does eat the remaining memory?

Regards, Frederic



reply via email to

[Prev in Thread] Current Thread [Next in Thread]