Message-ID: <004801c9a69a$4a63aaf0$0109220a@domain.hid> From: "Henry Bausley" References: <004301c9a683$c6b00200$0109220a@domain.hid> Date: Mon, 16 Mar 2009 17:49:55 -0700 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0045_01C9A65F.9E0261F0" Subject: Re: [Xenomai-help] ENXIO error with large shared memory List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: xenomai@xenomai.org This is a multi-part message in MIME format. ------=_NextPart_000_0045_01C9A65F.9E0261F0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable ftruncate returns 0 ----- Original Message -----=20 From: Henry Bausley=20 To: xenomai@xenomai.org Sent: Monday, March 16, 2009 3:08 PM Subject: [Xenomai-help] ENXIO error with large shared memory I am trying to map a large shared memory buffer and cannot seem to map 32= M. I get the error code ENXIO back from the posix skin mmap. The code works for ftruncate(prgshmfd, 16777216); pPrgShm =3D mmap(NULL, 16777216, PROT_READ | PROT_WRITE, MAP_SHARED, pr= gshmfd, 0); but fails if I have ftruncate(prgshmfd, 16777216*2); pPrgShm =3D mmap(NULL, 16777216*2, PROT_READ | PROT_WRITE, MAP_SHARED, = prgshmfd, 0); The condition failing is mmap in xenomai/skins/posix/shm.c.=20 if (!shm->addr || off + len > shm->size)=20 { err =3D ENXIO; up(&shm->maplock); goto err_free_map; } For 16M len =3D 0x1000000 and shm->size =3D 0x1000000 For 32M len =3D 0x2000000 and shm->size =3D 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 ---------------------------------------------------------------------------= --- _______________________________________________ Xenomai-help mailing list Xenomai-help@domain.hid https://mail.gna.org/listinfo/xenomai-help **********************************************************=0D Outbound scan for Spam or Virus by Barracuda at Delta Tau=0D ********************************************************** ------=_NextPart_000_0045_01C9A65F.9E0261F0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
ftruncate returns 0
----- Original Message -----
Fro= m:=20 He= nry=20 Bausley
Sent: Monday, March 16, 2009 3:08= =20 PM
Subject: [Xenomai-help] ENXIO erro= r with=20 large shared memory

I am trying to map a large shared memory= buffer=20 and cannot seem to map 32M.
I get the error code ENXIO back from the p= osix=20 skin mmap.
 
The code works for
  ftruncate(p= rgshmfd,=20 16777216);
  pPrgShm =3D mmap(NULL, 16777216, PROT_READ | PROT_WR= ITE,=20 MAP_SHARED, prgshmfd, 0);
but fails if I have
  ftruncate(prgs= hmfd,=20 16777216*2);
  pPrgShm =3D mmap(NULL, 16777216*2, PROT_READ |=20 PROT_WRITE, MAP_SHARED, prgshmfd, 0);
 

The condition failing is mmap in xenomai/skins/posix/shm.c.
 
 if (!shm->addr || off + len > shm->size)=20
        {
   err =3D= =20 ENXIO;
   up(&shm->maplock);
   goto=20 err_free_map;
 }
 

For  16M
len =3D 0x1000000 and shm->size =3D 0x100000= 0
 
For 32M
len =3D 0x2000000 and shm->size =3D 0x1FFF000
 
Is there something I didn't configure correctly that is limiting my= =20 size?
 
 
I am currently using 2.4.6 Xenomai, I-pipe 2.2-07 with kernel 2.6.26= -denx=20 on a 1Ghz PowerPC 460EX with 2G RAM


_______________________________________________
Xenomai-help ma= iling=20 list
Xenomai-help@domain.hid
https://mail.gna.org/listinfo/xenomai-hel= p
------=_NextPart_000_0045_01C9A65F.9E0261F0--