TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Why is there no realloc that takes the number of bytes to copy?

1 pointsby g0xA52A2Aabout 1 year ago

2 comments

compressedgasabout 1 year ago
Why not a realloc which just fails if it has to copy?
dave4420about 1 year ago
Is it good enough to realloc down to the number of bytes you’d want copying, and then realloc up to your desired buffer size?