mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-22 09:28:58 +00:00
uorb: reduce RAM usage by avoiding string copies
The lifetime of the string is guaranteed because we never delete DeviceNode objects and the strings in question are already on the heap. This frees roughly 2.2KB of RAM on Pixracer
This commit is contained in:
@@ -912,9 +912,9 @@ uORB::DeviceMaster::ioctl(device::file_t *filp, int cmd, unsigned long arg)
|
||||
} else {
|
||||
// add to the node map;.
|
||||
#ifdef __PX4_NUTTX
|
||||
_node_map.insert(nodepath, node);
|
||||
_node_map.insert(devpath, node);
|
||||
#else
|
||||
_node_map[std::string(nodepath)] = node;
|
||||
_node_map[std::string(devpath)] = node;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user