Recent

Author Topic: AWE 1.23 is here...  (Read 4832 times)

aminer

  • Hero Member
  • *****
  • Posts: 956
AWE 1.23 is here...
« on: January 20, 2013, 10:01:04 pm »

Hello,

AWE version 1.23 is here, i have corrected some minor bugs.


What have changed in version 1.2 ? now there is no getmem() and freemem() in AWEStream, you have just to pass the size of the stream to be allocated to the constructor, like  this:

awe1:=TAWEStream.create(getavailmem*1000);

and you can test after that if your memory was allocated like this:

if awe1.allocated

then writeln('Memory was allocated...')

else writeln('Memory was not allocated...');


I have also added another class called AWEMem , how to use
AWEMem ? when you  want to do a getmem() just call the
constructor by passing the size of the memory to be allocated like this: awemem:=TAWEMem.create(getavailmem*1000);
and the pointer will returned in awemem.memory

and when you want to do a freemem() just call the destructor

like this:

awemem.free


Description:

Why the 2 GB limitation on the Win 32bits systems ?

My AWE object pascal module is here, it allows your application to use up to 64GB of RAM.


You can download AWE from:

http://pages.videotron.com/aminer/


And here is the public interfaces of TAWEMem and TAWEStream classes, i have implemented the following methods:

TAWEStream = class

public

Memory:pointer;
allocated:boolean;
Size:longword;
position:longint;
PageSize:integer;

constructor Create(ulBytes: longint);
destructor Destroy(); override;

function HowManyPagesAllocated(): ulong;
function Seek(Offset: longint; Origin: Word): longint;
function CopyFrom(in_stream:TStream;count:longint):longint;
function CopyTo(out_stream:TStream;count:longint):longint;
function Read(var Buffer;count:longint):longint;
function Write(const Buffer;count:longint):longint;
procedure LoadFromStream(in_stream: TStream);
procedure LoadFromFile(const FileName: string);
function ToString:string;

published

property TotalMem:int64 read gettotalmem;
property AvailMem:int64 read getavailmem;
property MemLoad:int64 read getmemload;

end;

TAWEMem = class

public

memory:pointer;
allocated:boolean;
Size:lonword;
PageSize:integer;

constructor Create(ulBytes: ULONG);
destructor Destroy(); override;
function HowManyPagesAllocated(): ULONG;

end;

Note: To be able to use AWE you have to set the user rights correctly, so, go to:

Control Panel -> Administrative tools -> Local Security Policy -> User Rights Assignment and give 'Lock pages in memory' right to the user that wants to use AWE and reboot the system..

Every TAWEMem object can go up to 4GB of memory and every TAWEStream can go up to 2GB of memory, and you can go up to 64GB of memory !


And please look at the test examples 'test.pas' and 'test1.pas' inside the zipfile - compile and execute them... -


Language: FPC Pascal v2.2.0+ / Delphi 7+: http://www.freepascal.org/

Operating Systems: Windows 2000 and up (x86).

Required FPC switches: -O3 -Sd -dFPC -dWin32 -dFreePascal

-Sd for delphi mode....

Required Delphi switches: -DMSWINDOWS -$H+

For Delphi use -DDelphi




Thank you,
Amine Moulay Ramdane.





aminer

  • Hero Member
  • *****
  • Posts: 956
Re: AWE 1.23 is here...
« Reply #1 on: January 20, 2013, 10:07:18 pm »

Hello,

There is a company called Winsoft that is selling an AWE for
Delphi but it costs you 35$, here it is:

http://www.winsoft.sk/awe.htm


My AWE is better and it is free with the source code
and it costs you 0$.

You can download AWE from:

http://pages.videotron.com/aminer/



Thank you,
Amine Moulay Ramdane.





wjackson153

  • Sr. Member
  • ****
  • Posts: 267
Re: AWE 1.23 is here...
« Reply #2 on: January 21, 2013, 12:07:50 am »
Oh how I love Open Source Alternatives for Shareware or other forms of paid software.

You have done the Open Source Community a great favor in releasing to the
general public for all to learn from. Thank you aminer  ;D
Lazarus 1.1 r39490 CT FPC 2.7.1 i386-linux KDE
Linux Mint 14 KDE 4

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: AWE 1.23 is here...
« Reply #3 on: January 21, 2013, 07:16:51 am »
Hello Aminer,
Very interesting (as usual).
How close does this get us to a "ramdrive" component/lib? Something like Imdisk...
http://www.ltr-data.se/opencode.html/

I assume all that is left is to format and mount the TAWEmem object as a visible drive somehow.

Or how about a Sqlite VFS driver hosted on a TAWE object?
http://www.sqlite.org/vfs.html

This could go well with your Parallel Compression lib too.

Interested in your thoughts.

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: AWE 1.23 is here...
« Reply #4 on: January 21, 2013, 01:59:57 pm »

>Hello Aminer,
>Very interesting (as usual).
>How close does this get us to a "ramdrive" component/lib? >Something like Imdisk...
>http://www.ltr-data.se/opencode.html/

>I assume all that is left is to format and mount the TAWEmem >object as a visible drive somehow.

>Or how about a Sqlite VFS driver hosted on a TAWE object?
>http://www.sqlite.org/vfs.html

>This could go well with your Parallel Compression lib too.

>Interested in your thoughts.


Go and implement them if you want using my AWE and my parallel compressoin library if you want.

You are welcome.


Thank you,
Amine Moulay Ramdane.












aminer

  • Hero Member
  • *****
  • Posts: 956
Re: AWE 1.23 is here...
« Reply #5 on: January 21, 2013, 02:06:46 pm »

Hello,


Can someone among you implement a multithreaded memory manager
with my AWE ?


It will be good to have that also.


Thank you,
Amine Moulay Ramdane.



CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: AWE 1.23 is here...
« Reply #6 on: January 21, 2013, 09:15:05 pm »

>Hello Aminer,
>Very interesting (as usual).
>How close does this get us to a "ramdrive" component/lib? >Something like Imdisk...
>http://www.ltr-data.se/opencode.html/

>I assume all that is left is to format and mount the TAWEmem >object as a visible drive somehow.

>Or how about a Sqlite VFS driver hosted on a TAWE object?
>http://www.sqlite.org/vfs.html

>This could go well with your Parallel Compression lib too.

>Interested in your thoughts.


Go and implement them if you want using my AWE and my parallel compressoin library if you want.

You are welcome.


Thank you,
Amine Moulay Ramdane.

I was hoping for some insight/links on the necessary steps involved to have a working ramdrive.The Linux kernel has tempfs and ramfs that does this so it is only windows which needs the functionality. A cross platform solution might be easily realized, is my hope. I am searching, but can't seem to find much on the subject, and is definitely above my abilities.

If I can just address my TAWE memory object as, say "X://", then all the file management classes can address it as any other drive. We would have instant "in-memory" database functionality or "in-memory" anything else.

Simply put, a cross-platform implementation of "tempfs" and "ramfs" (currently Linux has it built into kernel, windows requires 3rd party dll)

If anyone has any insight/links on the low-level stuff that needs to be done, it would be appreciated.

Cheers

CaptBill

  • Sr. Member
  • ****
  • Posts: 435
Re: AWE 1.23 is here...
« Reply #7 on: January 26, 2013, 10:14:40 am »
Hi Aminer,
Mine won't compile.
win7, lazarus 1.1, fpc 2.7.1

I enabled 'lock memory' privileges as you instructed.

Code: [Select]
awe.pas(213,14) Warning: An inherited method is hidden by "procedure ToString:AnsiString;"
awe.pas(301,5) Error: Can't assign values to an address
awe.pas(302,5) Error: Can't assign values to an address
awe.pas(303,5) Error: Can't assign values to an address
« Last Edit: January 26, 2013, 10:32:03 am by CaptBill »

aminer

  • Hero Member
  • *****
  • Posts: 956
Re: AWE 1.23 is here...
« Reply #8 on: January 26, 2013, 03:53:04 pm »

Hello,


Have you used the -Sd (Delphi mode) to compile.

You have to use -Sd


Amine Moulay Ramdane.

 

TinyPortal © 2005-2018