* fhandler.h (fhandler_dev_mem): Erase member `init_phase' and
member function `init'.
* fhandler_mem.cc: Add typedefs for NT internal data types
`SYSTEM_INFORMATION_CLASS' and `SYSTEM_BASIC_INFORMATION'.
Add prototype for `NtQuerySystemInformation' function.
(fhandler_dev_mem::fhandler_dev_mem): Takes over initialization task
from `init'. Use `NtQuerySystemInformation' function to evaluate the
size of physical memory instead of interval search.
(fhandler_dev_mem::init): Eliminated.
(fhandler_dev_mem::open): Don't call `init'.
(fhandler_dev_mem::read): Eliminate check for `init_phase'.
(dummy_autoload): Add load statement for `NtQuerySystemInformation'.
This commit is contained in:
@@ -776,9 +776,6 @@ protected:
|
||||
int unit;
|
||||
DWORD mem_size;
|
||||
DWORD pos;
|
||||
bool init_phase;
|
||||
|
||||
void init (void);
|
||||
|
||||
public:
|
||||
fhandler_dev_mem (const char *name, int unit);
|
||||
|
||||
Reference in New Issue
Block a user