mORMot and Open Source friends
Check-in [d9c6d3ec0a]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:{4498} removed some unexpected hints
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d9c6d3ec0a1bb836b71a03970cb490e36284ff2a
User & Date: ab 2018-04-04 13:21:20
Context
2018-04-04
19:18
{4499} fixed ObjectToJSONFile() if both woHumanReadableEnumSetAsComment and woHumanReadable are set check-in: 43e1b3bd80 user: ab tags: trunk
13:21
{4498} removed some unexpected hints check-in: d9c6d3ec0a user: ab tags: trunk
13:20
{4497} optimized VarRecToTempUTF8() for variant values check-in: a50caaaebc user: ab tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to SynCommons.pas.

26272
26273
26274
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
.....
56911
56912
56913
56914
56915
56916
56917
56918
56919
56920
56921
56922
56923
56924
56925
56926
56927
.....
64490
64491
64492
64493
64494
64495
64496
64497
64498
64499
64500
64501
64502
64503
64504
64505
64506
    var ppsmemCounters: TProcessMemoryCounters; cb: DWORD): BOOL; stdcall;

procedure RetrieveSystemInfo;
var
  IsWow64Process: function(Handle: THandle; var Res: BOOL): BOOL; stdcall;
  GetNativeSystemInfo: procedure(var SystemInfo: TSystemInfo); stdcall;
  Res: BOOL;
  Kernel, PSAPI: THandle;
  P: pointer;
  Vers: TWindowsVersion;
  cpu: string;
begin
  Kernel := GetModuleHandle(kernel32);
  GetTickCount64 := GetProcAddress(Kernel,'GetTickCount64');
  if not Assigned(GetTickCount64) then
................................................................................
{$ifndef FPC}
var Heap: TMemoryManagerState;
    sb: integer;
    tot,res: QWord;
{$endif}
{$ifdef MSWINDOWS}
var global: TMemoryStatusEx;
    mem: TProcessMemoryCounters;
begin
  FillZero(global,SizeOf(global));
  global.dwLength := SizeOf(global);
  GlobalMemoryStatusEx(global);
  FMemoryLoadPercent := global.dwMemoryLoad;
  FPhysicalMemoryTotal.fBytes := global.ullTotalPhys;
  FPhysicalMemoryFree.fBytes := global.ullAvailPhys;
  FPagingFileTotal.fBytes := global.ullTotalPageFile;
  FPagingFileFree.fBytes := global.ullAvailPageFile;
................................................................................
begin
  BackgroundExecute(nil,wrSignaled,'');
end;

constructor TSystemUse.Create(const aProcessID: array of integer;
  aHistoryDepth: integer);
var i: integer;
    {$ifdef MSWINDOWS}
    h: HMODULE;
    {$endif}
begin
  inherited Create;
  fSafe := TAutoLocker.Create;
  fProcesses.Init(TypeInfo(TSystemUseProcessDynArray),fProcess);
  {$ifdef MSWINDOWS}
  if not Assigned(GetSystemTimes) or not Assigned(GetProcessTimes) or
     not Assigned(GetProcessMemoryInfo) then






|







 







|

|







 







<
<
<







26272
26273
26274
26275
26276
26277
26278
26279
26280
26281
26282
26283
26284
26285
26286
.....
56911
56912
56913
56914
56915
56916
56917
56918
56919
56920
56921
56922
56923
56924
56925
56926
56927
.....
64490
64491
64492
64493
64494
64495
64496



64497
64498
64499
64500
64501
64502
64503
    var ppsmemCounters: TProcessMemoryCounters; cb: DWORD): BOOL; stdcall;

procedure RetrieveSystemInfo;
var
  IsWow64Process: function(Handle: THandle; var Res: BOOL): BOOL; stdcall;
  GetNativeSystemInfo: procedure(var SystemInfo: TSystemInfo); stdcall;
  Res: BOOL;
  Kernel: THandle;
  P: pointer;
  Vers: TWindowsVersion;
  cpu: string;
begin
  Kernel := GetModuleHandle(kernel32);
  GetTickCount64 := GetProcAddress(Kernel,'GetTickCount64');
  if not Assigned(GetTickCount64) then
................................................................................
{$ifndef FPC}
var Heap: TMemoryManagerState;
    sb: integer;
    tot,res: QWord;
{$endif}
{$ifdef MSWINDOWS}
var global: TMemoryStatusEx;
    {$ifdef FPC}mem: TProcessMemoryCounters;{$endif}
begin
  FillCharFast(global,SizeOf(global),0);
  global.dwLength := SizeOf(global);
  GlobalMemoryStatusEx(global);
  FMemoryLoadPercent := global.dwMemoryLoad;
  FPhysicalMemoryTotal.fBytes := global.ullTotalPhys;
  FPhysicalMemoryFree.fBytes := global.ullAvailPhys;
  FPagingFileTotal.fBytes := global.ullTotalPageFile;
  FPagingFileFree.fBytes := global.ullAvailPageFile;
................................................................................
begin
  BackgroundExecute(nil,wrSignaled,'');
end;

constructor TSystemUse.Create(const aProcessID: array of integer;
  aHistoryDepth: integer);
var i: integer;



begin
  inherited Create;
  fSafe := TAutoLocker.Create;
  fProcesses.Init(TypeInfo(TSystemUseProcessDynArray),fProcess);
  {$ifdef MSWINDOWS}
  if not Assigned(GetSystemTimes) or not Assigned(GetProcessTimes) or
     not Assigned(GetProcessMemoryInfo) then

Changes to SynopseCommit.inc.

1
'1.18.4497'
|
1
'1.18.4498'