Virtual kernel memory layout: negative values

406 views Asked by At

i'm porting drivers for omap3-board to 3.5 kernel. When I start board I see it:

Memory: 256MB = 256MB total
Memory: 253564k/253564k available, 8580k reserved, 3226106074K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xc04a78ea - 0xc0573f24   (   0 kB)
    vmalloc : 0xc0573f24 - 0xc0573f2c   (5276 MB)
    lowmem  : 0xc0573fbc - 0xc0573f30   (-1068285412 MB)
    modules : 0xc03d93e4 - 0xc04a7927   (-65536 MB)
      .text : 0xffff1000 - 0x00000004   (-1048576 kB)
      .init : 0xfffe0000 - 0x00000380   (-796917760 kB)
      .data : 0xff000000 - 0x000002e8   (-1073741824 kB)
       .bss : 0xd0000000 - 0x00000100   (-1090519040 kB)
SLUB: Genslabs=11, HWalign=64, Order=0--1068023944, MinObjects=-1068023968, CPUs=-1071855052, Nodes=-1071855184

Why are values of memories so big and negative? How can I fix it?

1

There are 1 answers

0
David Schwartz On

You are probably manipulating unsigned 32-bit values using signed 32-bit data types. Use unsigned 32-bit data types or 64-bit data types.

Actually you may even be manipulating 64-bit values in 32-bit data types, it's hard to tell. I'd suggest using 64-bit data types.