I used the defaults that came up for my 2.6.28.8 kernel I-pipe 2.4-05. I'll rebuild the kernel with 2.6
[email protected]:/usr/local# dmesg | grep pipe ; dmesg | grep 2.4.8 ; uname -a ; /opt/ppmac/tune/test ; cat /proc/xenomai/heap ; /opt/ppmac/tune/test ; cat /proc/xenomai/heap I-pipe 2.4-05: pipeline enabled. I-pipe: Domain Xenomai registered. Xenomai: real-time nucleus v2.4.8 (Lords Of Karma) loaded. Linux powerpmac 2.6.28.8 #1 Mon Aug 17 11:51:01 PDT 2009 ppc GNU/Linux size=4161536:used=23120:pagesz=512 (main heap) size=32256:used=0:pagesz=512 (stack pool) size=4161536:used=23152:pagesz=512 (main heap) size=32256:used=0:pagesz=512 (stack pool) [email protected]:/usr/local# scripts/prepare-kernel.sh --linux=../linux-2.6.28.8/ --arch=powerpc On Sun, 2009-08-16 at 15:25 +0200, Gilles Chanteperdrix wrote: > wrote: > > Yes I can reproduce this on xenomai 2.4.8. Every time I call the > > functions below I lose 32 bytes. > > In my real application I actually have 6 different shared memory > > segments so I lose 192 bytes every time > > the app runs. > > There is no such leak on my test platforms, and it reminds me of a > problem with automatic process cleanup which was fixed in the powerpc > I-pipe patch some time ago. So, are you sure you are indeed running the > latest I-pipe patch for powerpc which comes with xenomai 2.4.8? > > My test program is the following: > > #include <stdio.h> > #include <stdlib.h> > > #include <unistd.h> > #include <sys/mman.h> > #include <sys/fcntl.h> > > #define SHM_NAME "/foo" > #define SIZE 128 * 1024 > > int main(void) > { > int shmfd = shm_open(SHM_NAME, O_CREAT | O_RDWR, 0777); > void *pshm; > int rc; > > if (shmfd == -1) { > perror("shm_open"); > exit(EXIT_FAILURE); > } > > rc = ftruncate(shmfd, SIZE); > if (rc == 1) { > perror("ftruncate"); > exit(EXIT_FAILURE); > } > > pshm = mmap(NULL, SIZE, > PROT_READ | PROT_WRITE, MAP_SHARED, shmfd, 0); > if (pshm == MAP_FAILED) { > perror("mmap"); > exit(EXIT_FAILURE); > } > > rc = munmap(pshm, SIZE); > if (rc == -1) { > perror("munmap"); > exit(EXIT_FAILURE); > } > > rc = close(shmfd); > if (rc == -1) { > perror("close"); > exit(EXIT_FAILURE); > } > > rc = shm_unlink(SHM_NAME); > if (rc == -1) { > perror("shm_unlink"); > exit(EXIT_FAILURE); > } > } > ********************************************************** Outbound scan for Spam or Virus by Barracuda at Delta Tau ********************************************************** _______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
