LKML Archive on
help / color / mirror / Atom feed
From: Remi Colinet <>
To: Stephen Torri <>
Cc: Linux Kernel <>
Subject: Re: Obtaining a list of memory address ranges allocated to processes
Date: Thu, 07 Dec 2006 01:36:25 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

Selon Stephen Torri <>:

> I am trying to create a custom ELF and Windows PE loader for the purpose
> of security research. I am having a difficult time finding how to
> allocate memory for a binary at the desired address in memory
> (especially if its non-relocatable).

Use mmap system call.
Anyway, the address is only going to be a hint.

> I would like to see why I cannot
> get memory allocated at the exact address request in the binary headers.

address should be page aligned.

> Is there a program or system call that allows me to see a list of memory
> address ranges allocated to the running processes on a system?

pmap pid_of_your_program will give you the memory map.

> Stephen


> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to
> More majordomo info at
> Please read the FAQ at

  reply	other threads:[~2006-12-07  0:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-06 23:56 Stephen Torri
2006-12-07  0:36 ` Remi Colinet [this message]
2006-12-07  7:10 ` Arjan van de Ven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \
    --subject='Re: Obtaining a list of memory address ranges allocated to processes' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).