f, fp (Fill Memory)

The f and fp commands fill the specified memory range with a repeating pattern.

These commands should not be confused with the ~F (Freeze Thread) command.

f Range Pattern 
fp [MemoryType] PhysicalRange Pattern


Specifies the range in virtual memory to fill. For more syntax details, see Address and Address Range Syntax.

(Kernel mode only) Specifies the range in physical memory to fill. The syntax of PhysicalRange is the same as that of a virtual memory range, except that no symbol names are permitted.

(Kernel mode only) Specifies the type of physical memory, which can be one of the following:

Cached memory.

Uncached memory.

Write-combined memory.

Specifies one or more byte values with which to fill memory.



f: user mode, kernel mode fp: kernel mode only


live, crash dump



Additional Information

For an overview of memory manipulation and a description of other memory-related commands, see Reading and Writing Memory.


This command fills the memory area specified by range with the specified pattern, repeated as many times as necessary.

The pattern parameter must be input as a series of bytes. These can be entered as numeric or as ASCII characters.

Numeric values will be interpreted as numbers in the current radix (16, 10, or 8). To change the default radix, use the n (Set Number Base) command. The default radix can be overridden by specifying the 0x prefix (hexadecimal), the 0n prefix (decimal), the 0t prefix (octal), or the 0y prefix (binary).

Note The default radix behaves differently when C++ expressions are being used. For more information, see the Evaluating Expressions topic.

If ASCII characters are used, each character must be enclosed in single straight quotation marks. C-style escape characters (such as '\0' or '\n') may not be used.

If multiple bytes are specified, they must be separated by spaces.

If pattern has more values than the number of bytes in the range, the debugger ignores the extra values.

Here are some examples. Assuming the current radix is 16, the following command will fill memory locations 0012FF40 through 0012FF5F with the pattern "ABC", repeated several times:

0:000> f 0012ff40 L20 'A' 'B' 'C'

The following command has the exact same effect:

0:000> f 0012ff40 L20 41 42 43

The following examples show how you can use the physical memory types (c, uc, and wc) with the fp command in kernel mode:

kd> fp [c] 0012ff40 L20 'A' 'B' 'C'
kd> fp [uc] 0012ff40 L20 'A' 'B' 'C'
kd> fp [wc] 0012ff40 L20 'A' 'B' 'C'

Send comments about this topic to Microsoft