|
|
Log in / Subscribe / Register

Printbuf rebuffed for now

Printbuf rebuffed for now

Posted Apr 29, 2022 13:35 UTC (Fri) by ldearquer (guest, #137451)
In reply to: Printbuf rebuffed for now by taladar
Parent article: Printbuf rebuffed for now

Maybe it is not too bad if you constraint your guess to the OOM management code paths. The rest of the code can still allocate dynamically.


to post comments

Printbuf rebuffed for now

Posted May 5, 2022 10:58 UTC (Thu) by smoogen (subscriber, #97) [Link]

Is it possible to have an 'early' set aside amount of memory, and then try to allocate more if needed and if it fails send a 'truncated' set of the output in the set-aside memory? That way if you run out you can still print something as a fall back? [And from this the try_alloc() call was written.. where we try to allocate but if its not there, meh.]


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds