mirror of https://github.com/ArduPilot/ardupilot
HAL_Linux: always report 256k of available memory
This commit is contained in:
parent
567ea0e420
commit
883ac59e4a
|
@ -100,4 +100,15 @@ bool Util::is_chardev_node(const char *path)
|
|||
return S_ISCHR(st.st_mode);
|
||||
}
|
||||
|
||||
/*
|
||||
always report 256k of free memory. Using mallinfo() isn't useful as
|
||||
it only reported the current heap, which auto-expands. What we're
|
||||
trying to do here is ensure that code which checks for free memory
|
||||
before allocating objects does allow the allocation
|
||||
*/
|
||||
uint32_t Util::available_memory(void)
|
||||
{
|
||||
return 256*1024;
|
||||
}
|
||||
|
||||
#endif // CONFIG_HAL_BOARD == HAL_BOARD_LINUX
|
||||
|
|
|
@ -38,6 +38,8 @@ public:
|
|||
bool is_chardev_node(const char *path);
|
||||
void set_imu_temp(float current);
|
||||
|
||||
uint32_t available_memory(void) override;
|
||||
|
||||
private:
|
||||
static Linux::ToneAlarm _toneAlarm;
|
||||
Linux::Heat *_heat;
|
||||
|
|
Loading…
Reference in New Issue