Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

306
Visualizações
Heap pages in /proc/<pid>/maps

I would like to write a program that could parse the output of /proc/<pid>/maps in order to classify them into different categories:

  • Image : the page is either a mapping of the binary or one of it's required libraries
  • Mapped file : the page maps a specific file like a font for example
  • Stack
  • Heap
  • Private data
  • Shareable

As you might have guessed, the main idea is to develop an equivalent of sysinternals's vmmap tool for Linux.

I'm using the pathname field to determine in which category a page could be associated with.

If pathname is the same path as /proc/<pid>/exe symlink, or if it is a dependency, therefore it goes to Image.

If pathname is a file and isn't part of the Image, then it is a Mapped File.

If pathname is matching a pattern like [stack:<tid>] or [heap], then the page is respectively a Stack or a Heap.

While I was looking for some information about /proc/<pid>/maps, I came accross this stackoverflow post missing-heap-section-in-proc-pid-maps , where I discovered that if you were calling malloc with the size parameter above a certain threshold, a private anonymous mapping was created instead of increasing the size of the Heap.

  1. How can I know if an anonymous mapping is an independant heap, or something else ?
  2. Should I treat all anonymous mapping as [heap] ? If not, how to classify them ?
  3. What page could fit into the Private Data, and Shareable categories ?

Thanks !

over 4 years ago · Santiago Trujillo
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda