5 ms·
> X has had its share of $5,000 toilet seats -- like Sun's Open Look clock tool, which gobbles up 1.4 megabytes of real memory! If you sacrificed all the RAM f
by bonyt 9y ago
> X has had its share of $5,000 toilet seats -- like Sun's Open Look clock tool, which gobbles up 1.4 megabytes of real memory! If you sacrificed all the RAM from 22 Commodore 64s to clock tool, it still wouldn't have enough to tell you the time. Even the vanilla X11R4 "xclock" utility consumed 656K to run. And X's memory usage is increasing.
I just opened up "clocktab.com" on Chrome, the first simple clock I could find by googling "clock," and Chrome's task manager shows it using a full 42 megabytes of memory.
- agumonkey 9y agoFound a pocket calculator / timer in a drawer the other day. That thing is probably not even measured in kB. And also run with 4 thumbnail size solar tiles.
- dom0 9y agoYes, these are hard-wired logic and just a handful of bytes for two to four registers (at least input and accumulator registers, everything in BCD). Only more advanced calculators use floating point.
- exikyut 9y agoI've been interested in how 4-function calculators and cheap clocks work for a while. Most of the implementational details would appear to be buried in files on engineering workstations at Chinese factories. I found a calculator teardown at http://electronupdate.blogspot.com.au/2016/08/reverse-engineering-simple-four.html http://electronupdate.blogspot.com.au/2016/08/reverse-engine... a while ago. The author says it's very old but doesn't provide a ballpark (eg, 1990, 1995, 1998, 2003, etc). It does look quite hairy (and possibly not particularly compactly designed?). I would guess there's a ridiculously simple ALU somewhere in there, but I wonder what else is involved in the specific context of a high-production-volume fixed-functionality design. I hope to find something similar for a clock at some point.
- chillingeffect 9y agoMy friend complained when I got my Amiga. He said, "When you put a disk in the drive, it takes up 10K!" I needed space on my phone the other day so I deleted the flashlight app, which turns an LED on and off, recovering 79 megabytes.
- mjevans 9y agoThat isn't built in to your OS?
- pvillano 9y agoWe should have a competition for smallest analog clock in terms of running memory.
- c-smile 9y agoHere is the one: Sciter renders: https://sciter.com/temp/sciter-analog-clock.png https://sciter.com/temp/sciter-analog-clock.png - it takes 50 Mb of memory for the whole process. This clock sample ( https://github.com/c-smile/sciter-sdk/blob/master/samples/graphics/analog-clock.htm https://github.com/c-smile/sciter-sdk/blob/master/samples/gr... ) is a port of Mozilla's clock : https://codepen.io/anon/pen/vJpqOY https://codepen.io/anon/pen/vJpqOY Chrome needs 6 separate processes to run this sample with total memory consumption of 575 Mb.
- bonyt 9y agoI fired up Windows 2.03 in DOSBox, with its clock app, available on archive.org[1], and it took up 60.1 MB. This is fun! I think the OS would run fine (at least, enough for the clock) with as little as 512K of ram[2]. Screenshot: https://i.imgur.com/09xjyPs.png https://i.imgur.com/09xjyPs.png [1]: https://archive.org/details/msdos_win2_03 https://archive.org/details/msdos_win2_03 [2]: https://support.microsoft.com/en-us/help/32905/windows-version-history https://support.microsoft.com/en-us/help/32905/windows-versi... ("512K of memory or greater" for 2.03).
- c-smile 9y agoIf you have screen of size 640*480 and rendering without AA then you can render by CPU. Otherwise, with modern hardware and 200 ppi monitors you will need GPU rendering with the whole infrastructure.
- benjarrell 9y agoWhat is that properties window from? That is not the properties window I am used to seeing.
- 9y ago
- mmagin 9y agoThe other day, for testing purposes, I managed to make a minimal docker container with the smallest 'exit 0' binary I could make without any serious trickery, just gcc -static -s -Os, and was kind of embarrassed that it took 840 kB. (I realize there are ways to get this down to probably the sub-1kB level, but I wanted something I could generate reliably on the fly in a shell script, so...)
- tadfisher 9y agoThe problem is glibc: https://github.com/lattera/glibc/blob/master/stdlib/exit.c https://github.com/lattera/glibc/blob/master/stdlib/exit.c And by extension, the rather complex set of POSIX exit() semantics: http://pubs.opengroup.org/onlinepubs/000095399/functions/exit.html http://pubs.opengroup.org/onlinepubs/000095399/functions/exi... Using something like musl should save you some bloat, or simply call "return 0;" instead of exit().