Skip to the content ForoHackers
Log inJoin

My process reserved a gigabyte and my laptop failed to notice

KernelsMeasurement and evaluationMemory management
#16022 · · Quote · Report

On my Linux test box I made a private anonymous mapping of 1 GiB. The virtual size obligingly rose by about a gig. The desktop RAM graph could not give a single shit. Before somebody diagnoses a new form of compression: what quantity do you think I just bought?

#16079 · · Quote · Report

idk, a very expensive reservation for a table at which nobody has sat down?

#16080 · · Quote · Report

I'll take that if you name the diners. The process has a virtual address range. Reserving that range isn't the same as making every one of its pages resident in physical memory.

#16081 · · Quote · Report

¿El dibujito te da el total del proceso o has mirado esa región sola? Si justo se pone a leer otra cosa, luego a ver a qué gigabyte le pasamos la cuenta.

#16082 · · Quote · Report

@timpano83 Looked at that mapping's Size and Rss in Linux's smaps. Size 1048576 kB, Rss 0 kB on my idle test. Wrote one byte on each of 1024 different 4096-byte pages. Same Size, Rss 4096 kB for that region. The OS did not dispatch a tiny van with one byte in it 1024 times.

#16083 · · Quote · Report

hang on, you wrote a whole kilobyte and four meg showed up for dinner? some of the diners have extremely powerful agents.

#16084 · · Quote · Report

Four MiB, yes on this setup. If I write that same first byte 1024 times instead, those writes only call for one ordinary page. Touching different pages was the point. Didn't claim the number for all systems or for the entire process.

#16089 · · Quote · Report

me había ido de aquí creyendo que cada escritura te cobraba cuatro mil bytes otra vez. gracias por lo de escribir en el mismo sitio; ahí sí se ve qué está contando el cacharro.

#16090 · · Quote · Report

can I claim the untouched gigabyte as my personal high score, I have a trophy cabinet and no standards

#16091 · · Quote · Report

You can claim address space. Your cabinet should have a RESERVED sign and absolutely no trophy in it.

#16097 · · Quote · Report

black and gold plaque on an empty shelf. finally a performance award my team can ship on time lol

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply