Page 1 of 1
GBD_TotalMemory returned value
Posted: Sat Jun 26, 2021 1:01 pm
by javierdlr
Hi using:
IGraphics->GetBoardDataTags(num, GBD_InternalMemorySize,&totalgfx, TAG_DONE);
IDOS->Printf("GBD_InternalMemorySize: %luMB\n",(uint32)(totalgfx/(1024*1024)));
IGraphics->GetBoardDataTags(num, GBD_TotalMemory,&totalgfx, TAG_DONE);
IDOS->Printf("GBD_TotalMemory : %luMB\n",(uint32)(totalgfx/(1024*1024)));
I get:
GBD_InternalMemorySize: 4096MB
GBD_TotalMemory : 241MB <-- ¿:-/
Should'n I get for GBD_TotalMemory 256MB? That's the value I get when using RadeonHD/RX ('getMemoryInfo()')
Re: GBD_TotalMemory returned value
Posted: Tue Jan 18, 2022 4:06 pm
by trgswe
don't know if you got an answer but...
I think it is the system that uses some of that 256 Mb Memory, most likely workbench/intuition, you might verify it if you open a large photograph and then runs that simple program it should be less than 241Mb?!
Re: GBD_TotalMemory returned value
Posted: Tue Jan 18, 2022 4:19 pm
by nbache
I guess the variables for WB's screen title either use the same call or another one with a similar issue. At least when I insert %mgtm in the format string in WB prefs with my HD6670, I get 239 MB.
Best regards,
Niels
Re: GBD_TotalMemory returned value
Posted: Wed Jan 19, 2022 3:35 am
by colinw
One of my pet hates is using the wrong units in displays, the IEC had this sorted out in 2008.
IDOS->Printf("GBD_TotalMemory : %luMiB\n",(uint32)(totalgfx/(1024*1024))); // Mebibyte (MiB)
IDOS->Printf("GBD_TotalMemory : %luMB\n",(uint32)(totalgfx/(1000*1000))); //Megabyte (MB)
Re: GBD_TotalMemory returned value
Posted: Wed Jan 19, 2022 11:18 am
by nbache
Yeah. Unfortunately, the major part of the rest of us are slower to adapt to this.
Blame it on the human mind's inertia.
Just look at the various countries still using miles and gallons.
And personally, I still think of my car's power in HP (DIN, of course) rather than kW.
The battle(s) will be won some day, but we're not there yet.
Edit: BTW, I think we already have BZs for at least some of these. If you (or any other developer) go ahead and fix them, I'd suggest leaving in the option to still use the traditional units at least for now, similar to the way most car manufacturers still state both HP and kW.
Best regards,
Niels