Newbie - Memory Usage Confusion

Hi

I've now got three working kernels all based on the stock 2.26.8.8 kernel. A and B have different feature sets and C is B linked against ucLibc. I'm now trying to determine which uses the least memory by booting each in turn and executing cat /proc/meminfo.

A: MemTotal=126836 MemFree=122868 B: MemTotal=126616 MemFree=122600 C: MemTotal=127116 MemFree=123116

The board has 128MB onboard or 131072 bytes. Can someone explain to me why none of the kernels agree about MemTotal and how I work out which kernel is using the least memory?

Regards

Reply to
Gilbert
Loading thread data ...

because each of those kernels keeps a different amount of memory aside for itself. The /proc/meminfo MemTotal value does not include the memory that the kernel needs to keep for itself, so the MemTotal is smaller (by that amount) than the size of the physical memory in the system. As for the differences between A, B, and C, each kernel keeps as much memory as it needs; different kernels, with different compiled- in features, have different memory requirements. Likely, the three kernels each have some minor differences as to the resident features they were compiled for.

By inference: MemTotal - known_maximum_memory =3D Kernel_size By observation: dmesg | grep '[Mm]emory:' and count up the allocations.

HTH

Reply to
Lew Pitcher

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.