Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^4: Segmentation fault

by martin (Pilgrim)
on Jun 25, 2007 at 22:11 UTC ( #623270=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Segmentation fault
in thread Segmentation fault

If you're really careful, you can clean up the linked list before it goes out of scope and prevent this error:

[two-way linked list example]

True, but way too much trouble. You may keep the original structure and just add a non-recursive disassembly:

my $i = 30000; my %h = (new => {}); my $r = \%h; for (0..$i) { print $_, "\r"; $r = $r->{new}; $r->{new} = {}; } $r = $h{new}; undef %h; while ($r) { $r = $r->{new}; } print "end\n";


Comment on Re^4: Segmentation fault
Download Code
Re^5: Segmentation fault
by Joost (Canon) on Jun 25, 2007 at 22:29 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://623270]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2014-12-20 12:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls