[SAoC] 'DPP with Linux kernel headers' Project Thread

Cristian Becerescu cristian.becerescu at yahoo.com
Mon Dec 16 21:24:22 UTC 2019


Update for week 4 of Milestone 3

- For the memory usage issue: I previously proposed changing from 
Appender to array (as I've seen the memory dropping from ~6GB to 
~2GB). In the last week I've been continuously testing those two 
versions to be sure. However I don't get constant results: 
sometimes both the appender and the array use more than 5GB, and 
other times both use 2GB (once I even got to max 600MB). The 
tests were done with the same input file and after system restart 
(just to make sure it's not a cache thing of some sorts). If you 
have any guess about why this might happen, please feel free to 
reply and let us know.

I also tested the performance for Appender vs array on Python.h 
(which is way smaller than the kernel headers I tested above), as 
Atila requested in the PR.

Appender version (~230MB):

User time (seconds): 18.78
System time (seconds): 2.62
Percent of CPU this job got: 99%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:21.41

Array version (~240MB):

User time (seconds): 17.39
System time (seconds): 0.22
Percent of CPU this job got: 100%
Elapsed (wall clock) time (h:mm:ss or m:ss): 0:17.61

- I've identified the issue which inserted C warnings in the 
generated D code (it's the C preprocessor whose output is 
redirected into the file). I have a local fix for this 
(redirecting the error messages), but I didn't make a PR yet.

- Also locally fixed an issue with void type extern variables. As 
discussed with my mentors, the solution is to change from void to 
char*.


More information about the Digitalmars-d mailing list