Re: Perl general questions

2010-05-13 Thread Uri Guttman
> "APK" == Akhthar Parvez K writes: APK> Yes, I think the memory space allocated by a process using APK> malloc() can't be really freed up until the calling process is APK> terminated. And processes that uses mmap() can unmap those chunk APK> size of memory when it's not needed. I gue

Re: Perl general questions

2010-05-13 Thread Shlomi Fish
On Thursday 13 May 2010 14:56:37 Akhthar Parvez K wrote: > On Thursday 13 May 2010, Akhthar Parvez K wrote: > > On Thursday 13 May 2010, Shlomi Fish wrote: > > > Then it is very likely that the memory allocated to the "mem" pointer > > > will not be returned to the kernel due to the nature of mallo

Re: Perl general questions

2010-05-13 Thread Akhthar Parvez K
On Thursday 13 May 2010, Akhthar Parvez K wrote: > On Thursday 13 May 2010, Shlomi Fish wrote: > > Then it is very likely that the memory allocated to the "mem" pointer will > > not > > be returned to the kernel due to the nature of malloc() and how it is an > > abstraction above sbrk(): > > >

Re: Perl general questions

2010-05-13 Thread Akhthar Parvez K
On Thursday 13 May 2010, Shlomi Fish wrote: > Then it is very likely that the memory allocated to the "mem" pointer will > not > be returned to the kernel due to the nature of malloc() and how it is an > abstraction above sbrk(): > > http://linux.die.net/man/2/sbrk > > perl 5 makes use of sbrk

Re: Perl general questions

2010-05-13 Thread Shlomi Fish
On Thursday 13 May 2010 11:59:36 Akhthar Parvez K wrote: > Hi Uri, > > APK> 3) Also, am I correct in guessing that the memory that's used to > > APK> allocate a variable defined with 'my' will be freed up once the > > APK> current lexical scope is exited? > > > > true but with a file lexical

Re: Perl general questions

2010-05-13 Thread Akhthar Parvez K
Hi Uri, Not sure if it was because I've been dealing with mainly web servers for the past few years, but I always read your name as U-R-I instead of Uri. :-) It looks like you've got a name that's relevant to your profession, most of us didn't have that fortune! On Thursday 13 May 2010, Uri Gu

Re: Perl general questions

2010-05-12 Thread Uri Guttman
> "APK" == Akhthar Parvez K writes: APK> 1) Since a hash defined in the main part (outside the APK> subroutines) of a program can be accessed from anywhere (from all APK> subroutines), is it fine, in regards to security or even code APK> elegancy, if we define a hash in the main part?