I'm trying to implement the times() function in C programming.
I'm using the struct tms structure which consists of the fields: tms_utime, tms_cutime,
tms_stime and tms_cstime.
In order to implement the times() function in ...
Originally Posted by matsp Filling 1MB of RAM with zeros takes about 40ns * 1024 * 1024 / 16 seconds - that is about 2.5 milliseconds (that is the time to actually write it to memory, not the time it takes to write it to the cache - that is faster). I don't think you care if your application startup time ...
I came across some unsual declaration of a structure in some kernel code. struct pdev_bus_dev { struct list_head list; struct platform_device pdev; struct resource resources[0]; }; Now I dont get why the last array has no elements? what does the compiler understand by an "array with no elements" . I think it shouldnt reserve any memory for it but if that ...
Well to zero it out is to make it all NULL or zero... what infamous41md did is that he just "set up" a location in memory for it which was all cleared out. This is good because it's shorter than typing bar.x = 0; bar.y = 0; bar.... one after another... (and it also takes less time to execute...(right?)!) and also ...