This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Thread safe memory allocations


On Thu, Aug 07, 2008 at 01:42:22PM +0200, Stefan Sommerfeld wrote:
> Hello,
>
> I use Doug Lea's memory allocation and enabled "Make thread safe", but 
> for me it looks like it doesn't do any locking. There's a MALLOC_LOCK 
> macro which is empty. I have sometimes a crash getting mallinfo, that's 
> why I searched for a lock inside getStatus().
>
> Is the thread safe implementation really working?

The locking should be happening at a higher level. All allocations
should be going through the code in
packages/services/memalloc/common/current/include/mempolt2.inl
although being a humble C programmer all this C++ classes and
templates stuff gets me confused. This template code uses scheduler
locking to make it thread safe.

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]