doing a bit of website development. going to write a c program to make pages next.

done a bit more work. i have an index page that is automatically generated now.

it doesn't look like much, but it's working :) now i need to actually manage memory instead of never freeing anything :/

@foura Does it just generate the web pages and then exit? If so why do you need to free memory? Just let the kernel do it when the program exits ;p

@foura It's a legitimate memory management strategy! I was talking about it earlier with some others. malloc() is memory safe but free() is when things start to go wrong, plus it's faster this way (unless you start swapping, which I assume this is simple enough not to).

@sirvertalot @foura It's actually the approach GCC and other compilers take as well; there's no need to free the memory unless you intend to reuse it.

Follow

@ndpi @sirvertalot huh ok. maybe i'll just free the page text once im done with it. no reason to hold my entire site content in memory.

Sign in to participate in the conversation
Mastodon @ SDF

"I appreciate SDF but it's a general-purpose server and the name doesn't make it obvious that it's about art." - Eugen Rochko