We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Talk:Malloc
Jump to navigation
Jump to search
Negative Numbers
Negative numbers should free memory Fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff (talk) 19:49, 5 October 2024 (UTC)
- Nope. The function malloc() in C accepts unsigned integers, so negative numbers should allocate memory, too. --None1 (Nope.) 07:21, 10 August 2026 (UTC)
malloc -1would result in allocating Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle 2^{64}-1}chars on a 64-bit platform so this is a very funny prank to use on your friends (if malloc succeeds) 【user:raiseafloppafan7741 | kausapin mo ako【past life・投稿】【▼(°ʌ°)▼】【Fight for what HTML deserves.】】 14:03, 31 August 2026 (UTC)- Currently, no computer has that much memory. --None1 (Nope.) 11:21, 1 September 2026 (UTC)
- Imagine if Malloc had an extension where you can write to the allocated memory, that way if
malloc -1succeeds, you can then start writing from the start of the allocated region into the higher addresses which will slowly make the process take up more pages which will cause the operating system to start thrashing. ——【FormaldehydeKaleidoscope // raiseafloppafan7741 mag-usap tayo】【past life・投稿】【▼(°v°)▼・▼(°ʌ°)▼】 16:40, 2 December 2026 (UTC)
- Imagine if Malloc had an extension where you can write to the allocated memory, that way if
- Currently, no computer has that much memory. --None1 (Nope.) 11:21, 1 September 2026 (UTC)