Bug #2042

Core: Fix build for uppsrc/Core/Cpu.cpp on FreeBSD (after 14570 revision)

Added by Sender Ghost 28 days ago. Updated 19 days ago.

Status:ApprovedStart date:06/13/2020
Priority:NormalDue date:
Assignee:Miroslav Fidler% Done:

0%

Category:CoreSpent 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.

uppsrc_Core_r14583.diff Magnifier - Proposed patch for uppsrc (since 14583 revision) (272 Bytes) Sender Ghost, 06/13/2020 10:23 AM

uppsrc_Core_r14616.diff Magnifier - Proposed patch for uppsrc (since 14616 revision) (747 Bytes) Sender Ghost, 06/22/2020 02:04 AM

History

#1 Updated by Sender Ghost 28 days ago

  • File deleted (uppsrc_Core_r14581.diff)

#2 Updated by Sender Ghost 28 days ago

Updated after 14583 revision changes.

#3 Updated by Miroslav Fidler 25 days 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 25 days ago

  • Assignee changed from Miroslav Fidler to Sender Ghost

#5 Updated by Sender Ghost 25 days 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 25 days ago

  • Status changed from Patch ready to Approved

Approved, because build issue was fixed.

#7 Updated by Miroslav Fidler 25 days 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 19 days ago

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 19 days ago

  • Status changed from In Progress to Approved

Thank you!

Also available in: Atom PDF