hb_xgrab can't allocate memory

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
AUGE_OHR
Posts: 1033
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 175 times
Been thanked: 288 times

hb_xgrab can't allocate memory

Post by AUGE_OHR »

hi,

i do load a big SDF into EDITBOX using

Code: Select all

   VALUE HB_MEMOREAD( cFile )
it does work but when exit and try another big SDF (> 220000 lines) it crash :(

Question : is there a Way to "free Memory" which was just before :idea:
have fun
Jimmy

User avatar
Rathinagiri
Posts: 5317
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Has thanked: 196 times
Been thanked: 210 times
Contact:

Post by Rathinagiri »

Have you tried releasing the control and redefine it?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.

User avatar
AUGE_OHR
Posts: 1033
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 175 times
Been thanked: 288 times

Post by AUGE_OHR »

hi,

i have close Windows and open it again.
happens on 32 Bit OS
have fun
Jimmy

User avatar
salamandra
Posts: 238
Joined: Thu Jul 31, 2008 8:33 pm
DBs Used: DBF, MySQL, SQL
Location: Brazil
Has thanked: 94 times
Been thanked: 9 times

Post by salamandra »

AUGE_OHR wrote:
Mon Aug 03, 2020 6:14 pm
hi,

i have close Windows and open it again.
happens on 32 Bit OS
Did you try RELEASE MEMORY ??


Best regards,

Salamandra, Brazil.
There is one time in which is crucial awakening. That time is now. ( Buddha )

User avatar
AUGE_OHR
Posts: 1033
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 175 times
Been thanked: 288 times

Post by AUGE_OHR »

hi,
salamandra wrote:
Tue Aug 04, 2020 5:53 pm
Did you try RELEASE MEMORY ??
no ... but i will try it, THX
have fun
Jimmy

User avatar
salamandra
Posts: 238
Joined: Thu Jul 31, 2008 8:33 pm
DBs Used: DBF, MySQL, SQL
Location: Brazil
Has thanked: 94 times
Been thanked: 9 times

Post by salamandra »

AUGE_OHR wrote:
Tue Aug 04, 2020 5:58 pm
hi,
salamandra wrote:
Tue Aug 04, 2020 5:53 pm
Did you try RELEASE MEMORY ??
no ... but i will try it, THX
AFAIK this error means that used memory can´t be discarded.
Perhaps you can use a Timer Control in your form to execute a RELEASE MEMORY.

best regards,

Salamandra, Brazil
There is one time in which is crucial awakening. That time is now. ( Buddha )

Carlos Britos
Posts: 225
Joined: Sat Aug 02, 2008 5:03 pm
Has thanked: 6 times
Been thanked: 7 times

Post by Carlos Britos »

Hi,
What about the bytes settled to editbox control ?
AUGE_OHR wrote:
Mon Aug 03, 2020 4:06 am
hi,

i do load a big SDF into EDITBOX using

Code: Select all

   VALUE HB_MEMOREAD( cFile )
it does work but when exit and try another big SDF (> 220000 lines) it crash :(

Question : is there a Way to "free Memory" which was just before :idea:
Regards/Saludos, Carlos (bcd12a)

User avatar
AUGE_OHR
Posts: 1033
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 175 times
Been thanked: 288 times

Post by AUGE_OHR »

Carlos Britos wrote:
Tue Aug 04, 2020 8:50 pm
What about the bytes settled to editbox control ?
now i direct assign it to EDITBOX VALUE ... hm ... :idea:

ok, i will try to write a "RELEASE" function and assign NIL
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 1033
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 175 times
Been thanked: 288 times

Post by AUGE_OHR »

hi,

YES, that seems to work now, THX :D

Code: Select all

PROCEDURE TXT_Edit( cFile, lEdit )
LOCAL cMemo := HB_MEMOREAD( cFile )

   DEFINE WINDOW TXTEdit ;
      ...
      ON RELEASE TXTRelease() ;
      
      DEFINE EDITBOX TXTCtrl
         ... 
         VALUE cMemo

      END EDITBOX
   END WINDOW

   ACTIVATE WINDOW TXTEdit
   cMemo := " "
RETURN

Code: Select all

STATIC PROCEDURE TXTRelease()
   TXTEdit.TXTCtrl.Value := " "
RETURN
have fun
Jimmy

Post Reply