From: "Henry Bausley" <hbausley@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] ENXIO error with large shared memory
Date: Mon, 16 Mar 2009 17:49:55 -0700 [thread overview]
Message-ID: <004801c9a69a$4a63aaf0$0109220a@domain.hid> (raw)
In-Reply-To: 004301c9a683$c6b00200$0109220a@domain.hid
[-- Attachment #1: Type: text/plain, Size: 1591 bytes --]
ftruncate returns 0
----- Original Message -----
From: Henry Bausley
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 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
------------------------------------------------------------------------------
_______________________________________________
Xenomai-help mailing list
Xenomai-help@domain.hid
https://mail.gna.org/listinfo/xenomai-help
**********************************************************
Outbound scan for Spam or Virus by Barracuda at Delta Tau
**********************************************************
[-- Attachment #2: Type: text/html, Size: 2734 bytes --]
next prev parent reply other threads:[~2009-03-17 0:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
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='004801c9a69a$4a63aaf0$0109220a@domain.hid' \
--to=hbausley@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--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.