[Top][All Lists]

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

[bugs #9199] nmalloc - allocation function for non freeable zones buggy

From: Mateu Batle
Subject: [bugs #9199] nmalloc - allocation function for non freeable zones buggy
Date: Thu, 03 Jun 2004 09:40:53 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113

This mail is an automated notification from the bugs tracker
 of the project: GNUstep.

[bugs #9199] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=9199>
Project: GNUstep
Submitted by: Mateu Batle
On: Thu 06/03/2004 at 13:40

Category:  Base/Foundation
Severity:  5 - Average
Item Group:  Bug
Resolution:  None
Assigned to:  None
Status:  Open

Summary:  nmalloc - allocation function for non freeable zones buggy

Original Submission:  Non freeable zones don't work in GNUstep. Function 
nmalloc always returns the same pointer call after call. It does not keep track 
of allocated space. The bug has not much influence, since this kind of zones 
are not used normally. I have only detected one use of them in StepTalk 
application, which can be safely changed to freeable zones.

If this is not easy to fix, at least put some code to show some error or throw 
an exception, so it the usage is easily detectable. Or even better, switch 
internally to freeable zones until fixed.

A piece of code reproducing the bug:

    NSZone * zone = NSCreateZone(NSPageSize(), NSPageSize(), NO);
    ptr1 = NSZoneMalloc(zone, 16);
    ptr2 = NSZoneMalloc(zone, 16);
    printf("0x%x 0x%x", ptr1, ptr2);

CC List

CC Address                          | Comment
mateu --DOT-- batle --AT-- tragnarion --DOT-- com | 

For detailed info, follow this link:

  Message sent via/by Savannah

reply via email to

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