CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Advanced:
Perl memory mapping

 



breakerfall
New User

Dec 28, 2007, 9:10 PM

Post #1 of 2 (1522 views)
Perl memory mapping Can't Post

If I print a reference (to an object) I get back the usual

foo::bar=HASH(0x4356a89)

If I fork() first it get back the same thing but printed twice (once for each process).

My question is why are the memory locations the same even though they are two distinct objects in memory? If I modify an object in the child process the parent process object is not touched.

Obviously the memory location is specific to the process executing the code. Is it simply a "local" location in the symbol table?


winfinit
User

Jan 28, 2008, 8:42 PM

Post #2 of 2 (1455 views)
Re: [breakerfall] Perl memory mapping [In reply to] Can't Post

hmm, can you please show me what exactly do you mean by "printed twice" when you fork

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives