Re: Questions about User Mode Linux

2011-10-13 Thread michi1
Hi! On 20:47 Thu 13 Oct , Richard Weinberger wrote: > Am 13.10.2011 20:10, schrieb mic...@michaelblizek.twilightparadox.com: > > After migrating from i386 to x86_64, my uml started to segfault in weird > > ways. > > What exactly is the problem? > Without any details nobody can and will help you.

Re: Heap memory is not re-claiming.

2011-10-13 Thread rohan puri
On Thu, Oct 13, 2011 at 2:36 PM, V.Ravikumar wrote: > > > On Thu, Oct 13, 2011 at 2:12 PM, Jeff Donner wrote: > >> On Thu, Oct 13, 2011 at 1:26 AM, V.Ravikumar >> wrote: >> > I've a daemon process and I'm allocating heap memory for big character >> > buffers using malloc/free. >> > Each can take

Re: Getting 'bad file number' error writing to device driver

2011-10-13 Thread Daniel Baluta
Hello, > I am trying to write to mydriver but get a 'Bad file number' error. > > int fd = open("/dev/mydriver",O_RDWR); > > this opens successfully as fd is not -1. > > ssize_t bytesToWrite = strlen(buf); > > value is: bytesToWrite 28 > > ssize_t bytesWritten = write(fd,buf,bytesToWrite); > > valu

Getting 'bad file number' error writing to device driver

2011-10-13 Thread Philip Anil-QBW348
I am trying to write to mydriver but get a 'Bad file number' error. int fd = open("/dev/mydriver",O_RDWR); this opens successfully as fd is not -1. ssize_t bytesToWrite = strlen(buf); value is: bytesToWrite 28 ssize_t bytesWritten = write(fd,buf,bytesToWrite); value is: bytesWritten -1 __a

Re: Questions about User Mode Linux

2011-10-13 Thread michi1
Hi! After migrating from i386 to x86_64, my uml started to segfault in weird ways. In the end, I figured that "make clean/mrproper/distclean" does not really clean up properly. I had to use "ARCH=um make distclean". The command "make distclean" did not remove these files: arch/um/include/shared/k

Re: ENOMEM failure on mmap call

2011-10-13 Thread Mulyadi Santosa
hi again :) 2011/10/14 Ezequiel García : > Reading sources I think kernel let the process create several > threads because as there is no real memory usage, the amount of free pages > on each thread allocation is the same. I agree, as long as Copy on Write hasn't kicked in sometimes it's the

Re: ENOMEM failure on mmap call

2011-10-13 Thread Ezequiel García
--- El jue 13-oct-11, Mulyadi Santosa escribió: > > I am sorry maybe I explained myself incorrectly, > threads don't actually > > allocate anything; just mmap it's own stack space (8MB > each). > > I see, so 8 MB each and since you created 10 threads, I > suppose > that would commit 8*10=80

Re: ENOMEM failure on mmap call

2011-10-13 Thread Mulyadi Santosa
Hi :) 2011/10/13 Ezequiel García : > > --- El jue 13-oct-11, Mulyadi Santosa escribió: > >> this is what I am not clear, do those 10 threads allocate 8 >> MB each? >> or 8 MB total? remember that threads share address space by >> default... >> > > I am sorry maybe I explained myself incorrectly,

Re: ENOMEM failure on mmap call

2011-10-13 Thread Ezequiel García
--- El jue 13-oct-11, Mulyadi Santosa escribió: > this is what I am not clear, do those 10 threads allocate 8 > MB each? > or 8 MB total? remember that threads share address space by > default... > I am sorry maybe I explained myself incorrectly, threads don't actually allocate anything; just

Re: Questions about User Mode Linux

2011-10-13 Thread tao jiang
michi: Thank you. 2011/10/12 : > Hi! > > On 19:15 Wed 12 Oct     , jiangtao.jit wrote: >> Hi: >> >> Need help with UML issue >> >> 1.is User Mode Linux still supported? > > I think so > >> 2.where can I find the latest Docs and guidelines? > > I usually refer to http://user-mode-linux.sourcefo

Re: Heap memory is not re-claiming.

2011-10-13 Thread Jeff Donner
>> On Thu, Oct 13, 2011 at 1:26 AM, V.Ravikumar >> wrote: >> > I've a daemon process and I'm allocating heap memory for big character >> > buffers using malloc/free. >> > Each can take 5MB. >> > >> > Though I freed/deleted memory allocated for the buffers, the increased >> > memory during the allo

Re: Heap memory is not re-claiming.

2011-10-13 Thread V.Ravikumar
On Thu, Oct 13, 2011 at 2:12 PM, Jeff Donner wrote: > On Thu, Oct 13, 2011 at 1:26 AM, V.Ravikumar > wrote: > > I've a daemon process and I'm allocating heap memory for big character > > buffers using malloc/free. > > Each can take 5MB. > > > > Though I freed/deleted memory allocated for the buff

Re: Heap memory is not re-claiming.

2011-10-13 Thread Jeff Donner
On Thu, Oct 13, 2011 at 1:26 AM, V.Ravikumar wrote: > I've a daemon process and I'm allocating heap memory for big character > buffers using malloc/free. > Each can take 5MB. > > Though I freed/deleted memory allocated for the buffers, the increased > memory during the allocation time is not re-cl

Heap memory is not re-claiming.

2011-10-13 Thread V.Ravikumar
Hello all, I've a daemon process and I'm allocating heap memory** for big character buffers using malloc/free. Each can take 5MB. Though I freed/deleted memory allocated for the buffers, the increased memory during the allocation time is not re-claiming back.This I observed using *top* command.