From: Arno P. <ar...@pu...> - 2012-06-06 10:44:16
|
GC_MALLOC_ATOMIC() is used for arrays that do not store object references (e.g., new byte[500000]). In this case it is clear that the memory region cannot contain references to other objects and hence the GC does not need to scan this region. Ultimately this is done as an optimization. Whether GC_MALLOC_ATOMIC() should be used or not is determined in XMLVMArray_getTypeInfo() (native_org_xmlvm_runtime_XMLVMArray.c). Can you please elaborate how this introduces a leak? Arno On 6/6/12 12:12 PM, Kensuke Matsuzaki wrote: > Hi, > > Now xmlvm2c uses GC_MALLOC_ATOMIC in XMLVMArray. > This causes memory leak, when I allocate large array (like new byte[500000]). > Perhaps xmlvm2c can use GC_MALLOC_ATOMIC_IGNORE_OFF_PAGE instead of GC_MALLOC_ATOMIC, > because array object has reference by head of allocated area. > > Thank you. > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users |