# Creating a KLD to dump memory



## officem (Jan 22, 2018)

Hi,
I'm trying to create a kernel module to dump the memory of a machine like lime.
Right now I'm using memrw implementation to read the physical memory, my problem with this method is the garbage pages that return a page filled with 0xFF's.
How can I create a dump containing only the physical available memory?
e.g my machine has 256mb so I want a 256mb memory dump.
Thanks.


----------



## theprofessor1321 (Nov 13, 2018)

Hey!
https://github.com/mbhatt1/FreeBmAM
Thanks,


----------

