- MSVC-bug - 3 Updates
Paavo Helde <eesnimi@osa.pri.ee>: Feb 15 03:34PM +0200 13.02.2024 13:07 Bonita Montero kirjutas: > function-object without any memory allocation. libstdc++ and libc++ > don't allocate any memory with such function<>-objects according > to the standard, but MSVC does allocate external memory. Cannot confirm that. MSVC++ 2022 x64 Release mode does not print "alloc" at all for this program. In Debug mode there are a couple of allocs, but these seem to be related to some std::string internals, not the reference wrapper. |
Bonita Montero <Bonita.Montero@gmail.com>: Feb 15 12:20PM +0100 Am 15.02.2024 um 14:34 schrieb Paavo Helde: > at all for this program. In Debug mode there are a couple of allocs, but > these seem to be related to some std::string internals, not the > reference wrapper. Sorry, I relied on the Debug build. With Release build there are no allocations. But I think the Debug build should also be up to the standard. |
Paavo Helde <eesnimi@osa.pri.ee>: Feb 16 12:11AM +0200 15.02.2024 13:20 Bonita Montero kirjutas: > Sorry, I relied on the Debug build. > With Release build there are no allocations. > But I think the Debug build should also be up to the standard. Constructing and copying std::strings is allowed to allocate dynamic memory. Make your string a bit longer and you will see allocations also in Release builds. |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment