All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stéphane ANCELOT" <sancelot@free.fr>
To: Xenomai@xenomai.org
Subject: [Xenomai] heap: bad usage or design problem using named heaps ?
Date: Thu, 26 Mar 2015 10:48:11 +0100	[thread overview]
Message-ID: <5513D5DB.9090809@free.fr> (raw)

Hi,

I faced the following problem with xeno 2.5.x , but may exist on other 
releases .

1/ I create a rt_heap
2/ in this rh_heap I alloc many named "data area"
I always give the global rt_heap ptr. no problem, areas are allocated.

3/problem arises when unallocating/unbinding
using rt_heap_free/rt_heap_unbind.
only the last segment created is freed. Because the global heap ptr size 
contains only size of the last allocation.


============================
to solve the problem, I had to use a distinct rt_heap for each named 
area, in this case.

At first, I may have misunderstood the way was working rt_heaps ?
I was thinking I could manage only a heap with many named modules inside 
it...

Regards
S.Ancelot








             reply	other threads:[~2015-03-26  9:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-26  9:48 Stéphane ANCELOT [this message]
2015-03-26 10:45 ` [Xenomai] heap: bad usage or design problem using named heaps ? Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5513D5DB.9090809@free.fr \
    --to=sancelot@free.fr \
    --cc=Xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.