[petsc-dev] Using multiple mallocs with PETSc

Barry Smith bsmith at mcs.anl.gov
Tue Mar 14 16:10:52 CDT 2017


> On Mar 14, 2017, at 4:04 PM, Jed Brown <jed at jedbrown.org> wrote:
> 
> Barry Smith <bsmith at mcs.anl.gov> writes:
> 
>>> On Mar 14, 2017, at 3:23 PM, Jed Brown <jed at jedbrown.org> wrote:
>>> 
>>> Barry Smith <bsmith at mcs.anl.gov> writes:
>>> 
>>>>> On Mar 13, 2017, at 1:27 PM, Jed Brown <jed at jedbrown.org> wrote:
>>>>> 
>>>>> Satish Balay <balay at mcs.anl.gov> writes:
>>>>>> stash the metadata for each allocation (and pointers for corresponding
>>>>>> free) in a hash table for all mallocs that we need to track? [this
>>>>>> avoids the wasted 'space' in each alloc.]
>>>>> 
>>>>> Sure, but this is just duplicating an implementation of malloc.
>>>> 
>>>>  No it isn't. It is a very thin wrapper around multiple current mallocs.
>>> 
>>> Meh, the proposal has more storage overhead than malloc().
>> 
>>   It still doesn't even come close to providing the functionality of malloc, so isn't a duplication of malloc
> 
> Fine, it's more wasteful than malloc while doing less than malloc, and
> still calls malloc.

   Well it actually does something malloc doesn't do. It allows for multiple malloc backends, and possibly allows for other things like tracking how often the malloced space is accessed. And keeps enough information for migration of malloced space.




More information about the petsc-dev mailing list