GBD_TotalMemory returned value

This forum is for general developer support questions.
Post Reply
User avatar
javierdlr
Beta Tester
Beta Tester
Posts: 389
Joined: Sun Jun 19, 2011 10:13 pm
Location: Donostia (GUIPUZCOA) - Spain
Contact:

GBD_TotalMemory returned value

Post 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()')
trgswe
Posts: 9
Joined: Thu Dec 31, 2020 1:28 pm

Re: GBD_TotalMemory returned value

Post 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?!
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: GBD_TotalMemory returned value

Post 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
User avatar
colinw
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 207
Joined: Mon Aug 15, 2011 9:20 am
Location: Brisbane, QLD. Australia.

Re: GBD_TotalMemory returned value

Post 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)
User avatar
nbache
Beta Tester
Beta Tester
Posts: 1714
Joined: Mon Dec 20, 2010 7:25 pm
Location: Copenhagen, Denmark
Contact:

Re: GBD_TotalMemory returned value

Post 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
Post Reply