FreeSlave / resusage

D library for getting system and process resource usage
Boost Software License 1.0
16 stars 5 forks source link

Call sysconf only at once #7

Closed kubo39 closed 4 years ago

FreeSlave commented 4 years ago

Should not PAGE_SIZE be __gshared, so it will be shared between all threads? By default global variables in D are thread-local, and using shared module consturctor you initialize it only in one thread.

kubo39 commented 4 years ago

Yes, it should be. Thanks for pointing out!

FreeSlave commented 4 years ago

Needs a @trusted getter for __gshared variable. I'm not on Linux system now, so I can't ensure everything is alright.

kubo39 commented 4 years ago

Ah, sorry. Fixed.