Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

58 lines
976 B

//
// Universal Resource Consumer: Just an innocent stress program
// Copyright (c) Microsoft Corporation, 1997
//
//
// module: pool.cxx
// author: silviuc
// created: Fri Apr 10 16:44:29 1998
//
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <windows.h>
#include "error.hxx"
#include "pool.hxx"
#include "consume.hxx"
//
// Function:
//
// ConsumeAllNonpagedPool
//
// Description:
//
// This function consumes as much non paged pool as possible.
//
void
ConsumeAllNonpagedPool ()
{
DWORD Count;
//
// For ever loop to consume nonpaged pool
//
for (Count = 0; ; )
{
if (CreateEvent (0, 0, 0, 0) == NULL)
{
Sleep (1000);
}
else
{
if (++Count % 1024 == 0)
printf (".");
}
}
}
//
// end of module: pool.cxx
//