mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
a few tests on corner cases, but the logic is too hard to get all of them, either:
capacity 1 gB wrong, actually 2 gB, deduced from 2x1gB sticks found, OR capacity 4 gB right, but 2 x 1 4gB stick found gives 8, which is wrong.
This commit is contained in:
parent
8da1e3bfd8
commit
38d88507da
13
inxi
13
inxi
|
@ -3,7 +3,7 @@
|
|||
#### Script Name: inxi
|
||||
#### Version: 2.1.95
|
||||
#### Date: 2014-08-13
|
||||
#### Patch Number: 02
|
||||
#### Patch Number: 03
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
########################################################################
|
||||
|
@ -8391,8 +8391,15 @@ get_ram_data()
|
|||
aMaxModuleSize[m]=int(aMaxModuleSize[m])
|
||||
}
|
||||
# note: some cases memory capacity == max module size, so one stick will fill it
|
||||
if (a_memory[j,3] != "" && aFoundModules[m] != 0 ) {
|
||||
if ( a_memory[j,3] < aDerivedModuleSize[m] * aFoundModules[m] ) {
|
||||
# but I think only with cases of 2 slots does this happen, so if > 2, use the count of slots.
|
||||
if (a_memory[j,3] != "" && ( aFoundModules[m] != 0 || a_memory[j,4] != "" ) ) {
|
||||
# not using this logic for now, too complicated and will not always work, grr.
|
||||
# so use just count x biggest module found
|
||||
if ( ( a_memory[j,4] > 1 ) && ( a_memory[j,3] < aDerivedModuleSize[m] * a_memory[j,4] ) ) {
|
||||
a_memory[j,3] = aDerivedModuleSize[m] * a_memory[j,4]
|
||||
estCap=" (est)"
|
||||
}
|
||||
else if ( ( aFoundModules[m] > 0 ) && ( a_memory[j,3] < aDerivedModuleSize[m] * aFoundModules[m] ) ) {
|
||||
a_memory[j,3] = aDerivedModuleSize[m] * aFoundModules[m]
|
||||
estCap=" (est)"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue