discuss-gnustep
[Top][All Lists]
Advanced

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

Re: NSOperationQueue - Killed after 40 seconds


From: Matthias Rudolph
Subject: Re: NSOperationQueue - Killed after 40 seconds
Date: Sat, 22 Mar 2014 17:17:55 +0100

Hi Ivan, hi Matt,
thanks for your responses.

It seems it is an memory allocation problem. dmsg: Out Of Memory. Thanks for the hint  ;-)

My class:

@interface ValueRow : NSObject {

    int value[5000000];

}

- (int)  getValueForIndex:(int) index;
- (void) setValueForIndex:(int) index withValue:(int)inputValue;

@end

@implementation ValueRow

- (int) getValueForIndex:(int) index {
    return value[index];
}

- (void) setValueForIndex:(int)index withValue:(int)inputValue {
    value[index] = inputValue;
}

@end

It seems the command „ValueRow *valueRow = [[ValueRow alloc] init]“ needs on OS X much less memory as on GnuStep in Ubuntu.
If I allocate 1440 instances of valueRow and I fill it with the same amount of data (index 0 - 60750) the Mac App only needs 400 MByte but on Linux with GnuStep are 8GByte RAM not enough.

Best regards
Matthias Rudolph


reply via email to

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