All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] ENXIO error with large shared memory
@ 2009-03-16 22:08 Henry Bausley
  2009-03-16 21:31 ` Gilles Chanteperdrix
  2009-03-17  0:49 ` Henry Bausley
  0 siblings, 2 replies; 9+ messages in thread
From: Henry Bausley @ 2009-03-16 22:08 UTC (permalink / raw)
  To: xenomai

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

I am trying to map a large shared memory buffer and cannot seem to map 32M.
I get the error code ENXIO back from the posix skin mmap.

The code works for
  ftruncate(prgshmfd, 16777216);
  pPrgShm = mmap(NULL, 16777216, PROT_READ | PROT_WRITE, MAP_SHARED, prgshmfd, 0);
but fails if I have
  ftruncate(prgshmfd, 16777216*2);
  pPrgShm = mmap(NULL, 16777216*2, PROT_READ | PROT_WRITE, MAP_SHARED, prgshmfd, 0);


The condition failing is mmap in xenomai/skins/posix/shm.c. 

 if (!shm->addr || off + len > shm->size) 
        {
   err = ENXIO;
   up(&shm->maplock);
   goto err_free_map;
 }


For  16M
len = 0x1000000 and shm->size = 0x1000000

For 32M
len = 0x2000000 and shm->size = 0x1FFF000

Is there something I didn't configure correctly that is limiting my size?


I am currently using 2.4.6 Xenomai, I-pipe 2.2-07 with kernel 2.6.26-denx on a 1Ghz PowerPC 460EX with 2G RAM

**********************************************************
Outbound scan for Spam or Virus by Barracuda at Delta Tau
**********************************************************

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

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

end of thread, other threads:[~2009-08-13 23:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-16 22:08 [Xenomai-help] ENXIO error with large shared memory Henry Bausley
2009-03-16 21:31 ` Gilles Chanteperdrix
2009-03-17  0:49 ` Henry Bausley
2009-03-17 15:18   ` Gilles Chanteperdrix
2009-03-17 16:08     ` Gilles Chanteperdrix
2009-03-17 19:16       ` Henry Bausley
2009-03-17 18:21         ` Gilles Chanteperdrix
2009-08-13 23:12           ` Henry Bausley
2009-03-17 18:23         ` Gilles Chanteperdrix

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.