- Available C++ Libraries FAQ - 2 Updates
- Windows does overcommit stacks ! - 1 Update
- Vector Fractal Bloom... - 1 Update
Backlands <backlands@riseup.net>: Mar 20 07:43PM On Tue, 14 Mar 2023 23:23:07 -0000 (UTC), Nikki Locke wrote: > form at http://www.trumphurst.com/cpplibs/cppsub.php > Maintainer: Nikki Locke - if you wish to contact me, please use the form > on the website. Thanks, this looks like a cool tool. |
Big Dick <Big.Dick@olcott.crap>: Mar 20 10:29PM On 20/03/2023 19:43, Backlands wrote: > Thanks, this looks like a cool tool. Only if the libraries are updated regularly and new ones added. There is no sign of any of this. |
Bonita Montero <Bonita.Montero@gmail.com>: Mar 20 06:45PM +0100 Here's another proof that Windows does overcommit stacks: #include <Windows.h> #include <iostream> #include <sstream> #pragma warning(disable: 6387) // parameter ... could ne null using namespace std; int main( int argc, char **argv ) { auto stackThread = []( LPVOID lpvThreadParam ) -> DWORD { char const *stackTop, *stackBottom; GetCurrentThreadStackLimits( &(ULONG_PTR &)stackBottom, &(ULONG_PTR &)stackTop ); SYSTEM_INFO si; GetSystemInfo( &si ); MEMORY_BASIC_INFORMATION mbi; auto query = [&]( char const *p ) -> char const * { if( VirtualQuery( p, &mbi, sizeof mbi ) != sizeof mbi ) ExitProcess( EXIT_FAILURE ); return (char *)mbi.AllocationBase; }; char const *base = query( stackBottom ), *p; do { cout << mbi.RegionSize / si.dwPageSize << ": "; unsigned n = 0; auto append = [&]<typename ... T>( T &&... values ) { if( n++ ) cout << ", "; ((cout << values), ...); }; if( mbi.State != MEM_FREE ) if( mbi.State == MEM_COMMIT ) append( "comitted" ); else if( mbi.State == MEM_RESERVE ) append( "reserved" ); else append( "S: 0x", hex, mbi.State ); if( !mbi.Protect ) append( "unacessible" ); else if( mbi.Protect & PAGE_GUARD ) append( "guard page" ); else if( mbi.Protect == PAGE_READWRITE ) append( "read-write" ); else append( "P: 0x", hex, mbi.Protect ); cout << endl; p = (char *)mbi.BaseAddress + mbi.RegionSize; } while( query( p ) == base ); return 123; }; HANDLE hThread = CreateThread( nullptr, 0x100000, stackThread, (void *)(ptrdiff_t)(argc >= 2), STACK_SIZE_PARAM_IS_A_RESERVATION, nullptr); WaitForSingleObject( hThread, INFINITE ); CloseHandle( hThread ); return 0; } This prints the attributes of the pages in the range of the stack. |
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Mar 19 10:33PM -0700 On 5/12/2022 12:16 PM, Chris M. Thomasson wrote: > Using my experimental vector field to generate a fractal formation. Here > is generation two: > https://fractalforums.org/gallery/1612-120522191048.png Fun with vector fields... https://fractalforums.org/gallery/1612-200323053241.jpeg |
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