All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: Perrine Martignoni <perrmart@domain.hid>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] Question about rtdm_mmap_to_user()
Date: Thu, 03 Apr 2008 18:25:39 +0200	[thread overview]
Message-ID: <47F50503.5000200@domain.hid> (raw)
In-Reply-To: <7289437c0804030734g7c2fea2h9ba93c1e89e8b699@domain.hid>

Perrine Martignoni wrote:
>>Mixing up RTDM and native API usage, though technically feasible, isn't
> a good idea anyway. Better have a look at Hannes' example, >and if that
> one or your own version still doesn't work, post more details (Xenomai
> version, target architecture, test code, etc.).
> 
> I found an example in Native-API-Tour.pdf which do this. I try to follow
> it and it doesn't work.
>

Except that the example listed in the document in question takes care of
defining the heap descriptor in global memory, not in the init_module() stack.

> static int dmem_Init(void)
> {   
>         RT_HEAP Heap;

^^^^ this won't survive long enough.

>         int ret =0;
>         void *p_HeapMem = NULL;
> ----------------------------------------------------------------------------------------------------------------------------------
> 
> I see in /proc/xenomai/registry/native/heaps the /HeapTest  /I create.
> And I see that :
> 
> * type=kernel:size=3017801728:used=1
>

i.e. we see a 2.8+ _gigabyte_ heap from which 1 single byte would be in use...,
albeit you defined a 2Kb heap initially, to be used as a single contiguous
segment. Getting braindamage values like this when looking at the /proc
interface should ring a bell about a possible corruption of some important
kernel-based information, like a heap descriptor.

-- 
Philippe.


  reply	other threads:[~2008-04-03 16:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-03  9:46 [Xenomai-help] Question about rtdm_mmap_to_user() Perrine Martignoni
2008-04-03 10:00 ` Bosko Radivojevic
2008-04-03 12:52   ` Perrine Martignoni
2008-04-03 13:07     ` Jan Kiszka
2008-04-04  7:18     ` Bosko Radivojevic
2008-04-04 12:59       ` Perrine Martignoni
2008-04-04 13:04         ` Gilles Chanteperdrix
2008-04-03 13:42   ` Gilles Chanteperdrix
2008-04-03 14:34     ` Perrine Martignoni
2008-04-03 16:25       ` Philippe Gerum [this message]
2008-04-03 10:07 ` Hannes Mayer

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=47F50503.5000200@domain.hid \
    --to=rpm@xenomai.org \
    --cc=perrmart@domain.hid \
    --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.