Bug #2042
Core: Fix build for uppsrc/Core/Cpu.cpp on FreeBSD (after 14570 revision)
Status: | Approved | Start date: | 06/13/2020 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | Miroslav Fidler | % Done: | 0% | |
Category: | Core | Spent time: | - | |
Target version: | - |
Description
There is following compiler error on FreeBSD after 14570 revision:
<..>/uppsrc/Core/Cpu.cpp:182:20: error: variable has incomplete type 'struct vmtotal' struct vmtotal vmt; ^ <..>/uppsrc/Core/Cpu.cpp:182:12: note: forward declaration of 'vmtotal' struct vmtotal vmt; ^ 1 error generated.
I found, that "struct vmtotal" defined in sys/vmmeter.h file.
Patch attached.
History
#1 Updated by Sender Ghost about 4 years ago
- File deleted (
uppsrc_Core_r14581.diff)
#2 Updated by Sender Ghost about 4 years ago
- File uppsrc_Core_r14583.diff added
- Assignee set to Miroslav Fidler
Updated after 14583 revision changes.
#3 Updated by Miroslav Fidler about 4 years ago
Thanks, applied. Could you please also verify that GetSystemMemoryStatus works in FreeBSD? "available" is not really precisly defined, but it should correspond to memory load somehow...
Mirek
#4 Updated by Miroslav Fidler about 4 years ago
- Assignee changed from Miroslav Fidler to Sender Ghost
#5 Updated by Sender Ghost about 4 years ago
- Assignee changed from Sender Ghost to Miroslav Fidler
Thanks for commit.
Miroslav Fidler wrote:
Could you please also verify that GetSystemMemoryStatus works in FreeBSD? "available" is not really precisly defined, but it should correspond to memory load somehow...
The upptst/MemoryStatus returned quite large values, compared to total/available memory. Posted some results on U++ slack.
#6 Updated by Sender Ghost about 4 years ago
- Status changed from Patch ready to Approved
Approved, because build issue was fixed.
#7 Updated by Miroslav Fidler about 4 years ago
- Status changed from Approved to In Progress
Not approved, because it does not work :) Still a problem to solve.
#8 Updated by Sender Ghost about 4 years ago
- File uppsrc_Core_r14616.diff added
Attached new patch.
Based on some answer from How to get available memory C++/g++ topic on Stack Overflow site. Overall, this was because of used types.
#9 Updated by Miroslav Fidler about 4 years ago
- Status changed from In Progress to Approved
Thank you!