Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8492527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:44:34+00:00 2026-06-10T22:44:34+00:00

As I said, I want to record the max memory used during program run

  • 0

As I said, I want to record the max memory used during program run time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:44:35+00:00Added an answer on June 10, 2026 at 10:44 pm

    Devel::Size only measures the memory size one at a time for one particular data structure to measure the total memory size of all data structure used in your script On Unix-like systems, Proc::ProcessTable provides a nice API for it:

    Here is a simple script, comparing it with Devel::Size.

     #!/usr/bin/perl -w
    use strict;
    use Proc::ProcessTable;
    use Devel::Size qw(size);
    
    
    my @arr = ('A' .. 'M');
    my $devel_size = size(\@arr);
    print "With DEVEL::SIZE I'm $devel_size bytes big\n";
    
    
    my $t = Proc::ProcessTable->new();
    
    foreach my $p ( @{$t->table} ) {
        if($p->pid() == $$) {
        print "With Proc::ProcessTable I'm ", $p->size(), " bytes big.\n";
            last;
        }
    }
    

    It gives:

    With DEVEL::SIZE I’m 104 bytes big.
    With Proc::ProcessTable I’m 5357568 bytes big.

    Note: source of Info: http://www.perlmonks.org/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to clean up some parsed text such as \n the said \r\n\r\n\r\n
    As the title said, I want to match ip address with batch in windows,
I want to assign record to a particular queue in my Silverlight application. I
AFAIK we cannot assign directly values to record members if the said record is
I have a table that is a history of a mysql record. I want
Someone I used to work for emailed me out of the blue and said
As said in the title, I have a scrollview that should be listening for
Title said it all. Some context: I got a search mechanism - search view,
Somebody said that when your PHP code and application use global variables then it
They said this expression is valid in C, and that it means calling a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.