All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] heap allocation in xenomai
@ 2007-02-16  9:48 manoj kumar
  2007-02-16 10:29 ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: manoj kumar @ 2007-02-16  9:48 UTC (permalink / raw)
  To: xenomai

[-- Attachment #1: Type: text/plain, Size: 308 bytes --]

Hi,

Could anybody tell me about heap allocation in xenomai by API
rt_heap_create().

Why heap creation is required? Please tell the uses in detail?

Can kmalloc & free be used in any RT program at kernel space? If yes, Are
there any limitation on that? if Yes, then which are those.

Thanks & Regards
Manoj

[-- Attachment #2: Type: text/html, Size: 491 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai-help] heap allocation in xenomai
  2007-02-16  9:48 [Xenomai-help] heap allocation in xenomai manoj kumar
@ 2007-02-16 10:29 ` Jan Kiszka
       [not found]   ` <528bc2040702160328o5d35d085s3cbe0953ac29163e@domain.hid>
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2007-02-16 10:29 UTC (permalink / raw)
  To: manoj kumar; +Cc: xenomai

[-- Attachment #1: Type: text/plain, Size: 941 bytes --]

manoj kumar wrote:
> Hi,
> 
> Could anybody tell me about heap allocation in xenomai by API
> rt_heap_create().
> 
> Why heap creation is required? Please tell the uses in detail?

The native skin's heaps provide means to reserve separate memory pools
and to perform deterministic allocation on it (as far as the heap usage
patterns are known).

For further derails, please read the API documentation and consult e.g.
the demo code: ksrc/skins/native/snippets/local_heap.c. Or ask a bit
more concrete questions.

> 
> Can kmalloc & free be used in any RT program at kernel space? If yes, Are
> there any limitation on that? if Yes, then which are those.

You can, but only during module init/cleanup, *NOT* while running inside
an RT task. That's because these Linux services may have been preempted
by Xenomai at any point while Linux was using it, and a re-entrance from
a Xenomai task would corrupt them.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Xenomai-help] heap allocation in xenomai
       [not found]   ` <528bc2040702160328o5d35d085s3cbe0953ac29163e@domain.hid>
@ 2007-02-16 18:36     ` Jan Kiszka
  0 siblings, 0 replies; 3+ messages in thread
From: Jan Kiszka @ 2007-02-16 18:36 UTC (permalink / raw)
  To: manoj kumar; +Cc: xenomai-help

[-- Attachment #1: Type: text/plain, Size: 386 bytes --]

[please keep the CC]

manoj kumar wrote:
> thanks jan
> 
> What is the limitation of size for heap creation? Is it 2Gb as given by
> XNHEAP_MAXEXTSZ (1 << 32)?b

Yes, given that you have enough (kernel) memory...

> 
> What is the limitation of size of data that can be read or write on the
> pipe?

Basically the same as above. Pipes are built on top of heaps.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-16 18:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-16  9:48 [Xenomai-help] heap allocation in xenomai manoj kumar
2007-02-16 10:29 ` Jan Kiszka
     [not found]   ` <528bc2040702160328o5d35d085s3cbe0953ac29163e@domain.hid>
2007-02-16 18:36     ` Jan Kiszka

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.