partial memory dump

Dan Nelson dnelson at
Tue Mar 8 13:39:39 PST 2005

In the last episode (Mar 08), Vijay.Singh at said:
> Hello all. I am trying to allow a FreeBSD based kernel to crash dump
> even if configured swap is not enough to fill entire physical memory.
> This is because there could be 2G RAM on the system. I assume that
> most pages would not be mapped.
> The algorithm to do this is to have a bitmask, with bits set for
> pages: from 0 to Maxmem, and then adding pages from USRSTACK to
> vm_map_max(kmem_map).  This is done in scsi_da.c, dadump() routine. I
> am able to get the dump, and after savecore collects it from swap I
> get the kernel and core files. However I am not able to get the stack
> trace.

I think you also need to write that bitmap to disk so that savecore can
read it and put the data blocks in the right place in the vmcore file. 
You want to end up a with a sparse file, with blank spots every place
dadump skipped a block.

	Dan Nelson
	dnelson at

More information about the freebsd-hackers mailing list