# Limit onboard memory system used



## varda (Mar 17, 2009)

Hello Gentlemen.

I have assmbled desktop from the collected spare parts a couple of months back. Then noticed that periodically the system is rebooted several times per week with 'page fault while in kernel mode' message. There is 7.1-RELEASE amd64 on C2D 3.16Ghz and one 2GB memory module. It passes BIOS cheking during POST at full size. I have tested memory myself and found that it broken after 1920MB, i.e. only high 128MB from 2GB.

Therefore a question, is it possible to limit system to use only a lower good part of memory below broken bytes starts?


----------



## mk (Mar 17, 2009)

grep memory /boot/defaults/loader.conf

```
#hw.physmem="1G"                # Limit physical memory. See loader(8)
#vm.kmem_size=""                # Sets the size of kernel memory (bytes)
```
from loader(8)

```
hw.physmem    Limit the amount of physical memory the system will use.
                   By default the size is in bytes, but the k, K, m, M, g and
                   G suffixes are also accepted and indicate kilobytes,
                   megabytes and gigabytes respectively.  An invalid suffix
                   will result in the variable being ignored by the kernel.
```


----------



## varda (Mar 18, 2009)

*Thanks*

mk, thaks for pointing me to this tip. This is what I exactly needs.


----------

