[Mono-dev] Malloc issue?

Greg Young gregoryyoung1 at gmail.com
Fri Aug 24 01:03:42 UTC 2012


Didn't reply to all.

Code is very simple (allocates 16 mb and frees it).

Also this in an internal assertion is this really the best way? If we
passed wrong parameters etc I would kind of expect an exception.

On Friday, August 24, 2012, Rodrigo Kumpera wrote:

> Either your app is broken or linux's malloc is. Mono does nothing special
> but call malloc/free.
>
> One issue might be if you're allocating more than 2Gb of memory at once.
> This will probably break on mono.
>
>
> On Thu, Aug 23, 2012 at 3:35 AM, Greg Young <gregoryyoung1 at gmail.com<javascript:_e({}, 'cvml', 'gregoryyoung1 at gmail.com');>
> > wrote:
>
>> We are allocating and releasing unmanaged memory with
>> marshal.allochglobal. In mono we are getting the following failure (no
>> failures under clr).
>>
>> Any ideas?
>>
>>
>> part from team city logs:
>> [20:55:52][Step 2/2] mono: malloc.c:2451: sYSMALLOc: Assertion `(old_top
>> == (((mbinptr) (((char *) &((av)->bins[((1) - 1) * 2])) -
>> __builtin_offsetof (struct malloc_chunk, fd)))) && old_size == 0) ||
>> ((unsigned long) (old_size) >= (unsigned long)((((__builtin_offsetof
>> (struct malloc_chunk, fd_nextsize))+((2 * (sizeof(size_t))) - 1)) & ~((2 *
>> (sizeof(size_t))) - 1))) && ((old_top)->size & 0x1) && ((unsigned
>> long)old_end & pagemask) == 0)' failed.
>> [20:55:52][Step 2/2] Stacktrace:
>> [20:55:52][Step 2/2]
>>
>>
>> --
>> Le doute n'est pas une condition agréable, mais la certitude est absurde.
>>
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com <javascript:_e({}, 'cvml',
>> 'Mono-devel-list at lists.ximian.com');>
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>
>>
>

-- 
Le doute n'est pas une condition agréable, mais la certitude est absurde.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120824/e3d9869e/attachment-0001.html>


More information about the Mono-devel-list mailing list