It's a good question. As others have noted, jemalloc attempts to mitigate fragmentation, but you can't ever compact in a language where you can hand out pointers willy-nilly, so you would expect fragmentation to strictly increase as uptime approaches infinity. That said, Rust code doesn't tend to be especially allocation-heavy in the first place, and repeatedly allocating/freeing in a hot loop is already something that tends to be avoided as a core tenet of performance tuning, so allocator traffic may not be very heavy in the first place.
I don't have any long-running Rust code myself, but I do know people who have had Rust servers that have been running for upwards of six months and they seem to be pleased at both how little memory it consumes and at how reliable it's been (you don't ever get tremendous uptime if your code isn't robust in the first place :P ).
I'm definitely sympathetic to the argument that by avoiding allocation in the first place that you don't have to worry as much about memory profile.
I allocate and destroy a bunch of arrays in my code (~100MB every minute), so it's not huge but definitely quite a few pages every time it happens. And so far I've got one process that's been running for 6 months. For the most part, whenever I get new data, I take a slice of an old array and append the new data to it to create a new array. It's fast enough, but more importantly it's just so much easier to do it that way and with a compacting GC I don't have to worry about anything.
Of course I don't know how good jemalloc is at avoiding fragmentation, and I don't have the time to rewrite my code (maybe enough time to simulate, not sure). But my code creates a ton of fragment-y garbage, and I would imagine that with Rust I would end up not just translating my code, but changing semantics to mutate in place, just to avoid fragmentation. I guess maybe /r/rust would be the place to ask.
Mostly, what I’ve heard about long-running processes is that, if they don’t have a leak somewhere, they tend to be pretty stable, so compaction isn’t a huge issue.
I don't have any long-running Rust code myself, but I do know people who have had Rust servers that have been running for upwards of six months and they seem to be pleased at both how little memory it consumes and at how reliable it's been (you don't ever get tremendous uptime if your code isn't robust in the first place :P ).