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

  • Home
  • SEARCH
  • 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 7534949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:09:51+00:00 2026-05-30T06:09:51+00:00

I want to enter the pid at the command line and get back the

  • 0

I want to enter the pid at the command line and get back the largest contiguous address space that has not been reserved. Any ideas?

Our 32 bit app, running on 64 bit RHEL 5.4, craps out after running for a while, say 24 hours. At that time it is only up to 2.5 gb of memory use, but we get out of memory errors. We think it failing to mmap large files because the app’s memory space is fragmented. I wanted to go out to the production servers and just test that theory.

  • 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-05-30T06:09:52+00:00Added an answer on May 30, 2026 at 6:09 am

    Slighly nicer version of my above comment:

    #!perl -T
    
    use warnings;
    use strict;
    
    scalar(@ARGV) > 0 or die "Use: $0 <pid>";
    
    my $pid = $ARGV[0];
    $pid = oct($pid) if $pid=~/^0/;         # support hex and octal PIDs
    $pid += 0; $pid = abs(int($pid));       # make sure we have a number
    
    open(my $maps, "<", "/proc/".$pid."/maps") or
            die "can't open maps file for pid ".$pid;
    
    my $max = 0;
    my $end = 0;
    while (<$maps>) {
            /([0-9a-f]+)-([0-9a-f]+)/;
            $max = hex ($1) - $end if $max < hex ($1) - $end;
            $end = hex ($2);
    }
    
    close ($maps);
    
    END {
            print "$max\n";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

in sqlite3 using the command line, if I want to enter something very approximate
I am trying to get my options straight with some inputs that I want
I want to enter some image file that is in ../img/test.jpg into the database
I want enter(Go.... etc) button on my iPad keypad. So that when I hit
I want to enter mysite.com/#test1 in address bar . My site is configed so
I have a text-box, and I want to enter a string in language A
Is it alright to do this? $author = strtolower($_SESSION['valid_username']); I want to enter all
I want to interpret Enter key as Tab key in whole my WPF application,
I want users to enter a comma-delimited list of logins on the form, to
I have textarea in my site(link shortening site) i want to user enter some

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.