in reply to Memory reusability

If (as you say in Re^2: Memory management) you're writing an OS in Perl, but (as this post implies) you're just starting to learn Perl, I'd suggest you find a simpler project to start with ...