SF.net SVN: harbour-project:[17088] trunk/harbour

23 views
Skip to first unread message

dru...@users.sourceforge.net

unread,
Oct 22, 2011, 10:22:38 AM10/22/11
to harbou...@googlegroups.com
Revision: 17088
http://harbour-project.svn.sourceforge.net/harbour-project/?rev=17088&view=rev
Author: druzus
Date: 2011-10-22 14:22:37 +0000 (Sat, 22 Oct 2011)
Log Message:
-----------
2011-10-22 16:22 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/src/vm/fm.c
! do not enable by default DLMALLOC in WinCE builds.
It was the source of problems reported by Jarek with file read/write
operation in WinCE builds. Now it should work correctly - please
make some tests with real devices - I used emulator only.

* harbour/contrib/hbwin/wapi_wingdi_font.c
+ added WAPI_ADDFONTRESOURCE() and WAPI_REMOVEFONTRESOURCE()

Modified Paths:
--------------
trunk/harbour/ChangeLog
trunk/harbour/contrib/hbwin/wapi_wingdi_font.c
trunk/harbour/src/vm/fm.c

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Jarosław Kądzioła

unread,
Oct 23, 2011, 3:15:57 PM10/23/11
to harbou...@googlegroups.com

Hi Przemek,

> 2011-10-22 16:22 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
> * harbour/src/vm/fm.c
> ! do not enable by default DLMALLOC in WinCE builds.
> It was the source of problems reported by Jarek with file read/write
> operation in WinCE builds. Now it should work correctly - please
> make some tests with real devices - I used emulator only.


I did two tests on HTC with WM 6.5

First with RDD :

--------------------------------------------------------
Proc Main()
Set Date Ansi
REQUEST HB_CODEPAGE_PLWIN
HB_CDPSELECT( "PLWIN" )

REQUEST DBFCDX
RDDSETDEFAULT( "DBFCDX" )

a=hb_milliSeconds()

For y =1 To 999
aDane := {}
For y =1 To 999
@1,10 Say y
AAdd(aDane, {'FIELD_' + AllTrim(Str(y,3,0)) , "C", 2, 0})
dbCreate('dane.dbf',aDane)
b=hb_milliSeconds()
? b - a
inkey(.01)
Next
--------------------------------------------------------


and second with write operations (by Przemek)


--------------------------------------------------------
proc main()
local i, h, n1, n2
? "test1"
h:=fcreate("_tst1.dat")
n1:=32
for i:=1 to 8192
n2:=fwrite(h,space(n1))
if n1!=n2
? str(i,4), str(n1,5), str(n2,5), h, str(i*32,5)
if inkey(10) != 13
exit
endif
endif
next
fclose(h)
? "test2"
for i:=1 to 8192
h:=fcreate("_tst2.dat")
n1:=i*32
n2:=fwrite(h,space(n1))
fclose(h)
if n1!=n2
? str(i,4), str(n1,5), str(n2,5), h
if inkey(10) != 13
exit
endif
endif
next
wait
return
--------------------------------------------------------

In both cases all is OK.
In previous version of harbour i've got errors in these tests.
Przemek, can you send any other tests ?
Thanks a lot for your job and your time !

--
Regards,
Jaroslaw Kadziola


Przemysław Czerpak

unread,
Oct 25, 2011, 10:59:44 AM10/25/11
to harbou...@googlegroups.com
On Sun, 23 Oct 2011, Jarosław Kądzioła wrote:

Hi Jarek,

> > 2011-10-22 16:22 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
> > * harbour/src/vm/fm.c
> > ! do not enable by default DLMALLOC in WinCE builds.
> > It was the source of problems reported by Jarek with file read/write
> > operation in WinCE builds. Now it should work correctly - please
> > make some tests with real devices - I used emulator only.
> I did two tests on HTC with WM 6.5
> First with RDD :

[...]


> and second with write operations (by Przemek)

[...]


> In both cases all is OK.

Thank you very much for your tests.

> In previous version of harbour i've got errors in these tests.
> Przemek, can you send any other tests ?

I do not think it's necessary. I can create some other tests but
they should work without problems. This problem was exploited only
in some seldom cases, i.e. in emulator above tests worked correctly
if I created files in storage device directory so it was exploitable
only by some low level device drivers which do not accept memory
regions allocated by VirtualAlloc() in DLMALLOC code. I haven't
make deeper tests to find the exact source of problem and solution -
sorry I do not have enough spare time to check it now. The process
memory in WinCE is mapped in really hacked way (looks that MS guys
are ill if they do not create some hardcoded limits) and DLMALLOC
is not updated for such mapping. Probably it can be quite easy
resolved but standard MM and HB_FM_WIN_ALLOC works correctly so
I'm leaving it for some future work. Anyhow WinCE developers should
not allocate too much of memory in their applications because this
system has hardcoded 32MB limit per process.

> Thanks a lot for your job and your time !

Thank you for your tests.
BTW I do not use WinCE builds so it would be nice if you can
tests if GTWVT works with this system from time to time and
reports problems if any so we can fix them.

best regards,
Przemek

Jaroslaw Kadziola

unread,
Oct 25, 2011, 11:40:53 AM10/25/11
to Przemysław Czerpak
Hi Przemek,


> I do not think it's necessary. I can create some other tests but
> they should work without problems.

You are right.

As i wrote my main problem is not properly functioning application
written using FiveWin for Pocket PC. Now i wait until Antonio rebuild
its library, and if everything will be ok, i can say that the problem
disappeared.


> BTW I do not use WinCE builds so it would be nice if you can
> tests if GTWVT works with this system from time to time and
> reports problems if any so we can fix them.

Of course, no problem.

One more time many thanks for your great job.


--
Regards,
Jaroslaw Kadziola


Przemysław Czerpak

unread,
Oct 25, 2011, 12:00:53 PM10/25/11
to harbou...@googlegroups.com
On Tue, 25 Oct 2011, Jaroslaw Kadziola wrote:

Hi Jarek,

> As i wrote my main problem is not properly functioning application
> written using FiveWin for Pocket PC. Now i wait until Antonio rebuild
> its library, and if everything will be ok, i can say that the problem
> disappeared.

Only Harbour has to be rebuild and you should be able to make it
yourself. Harbour license give you such rights so you should ask
Antonio about build instructions and any patches to Harbour core
code if they were applied and then rebuild Harbour core yourself.
Anyone creating custom version of [x]Harbour compiler has to give
such information for final users. Otherwise such custom Harbour
binaries are illegal.

best regards,
Przemek

Jaroslaw Kadziola

unread,
Oct 25, 2011, 12:15:18 PM10/25/11
to Przemysław Czerpak
Witam!

W liście datowanym 25 października 2011 (18:00:53) napisano:

> Hi Jarek,

If you like, then take a look here :

http://forums.fivetechsupport.com/viewtopic.php?f=4&t=22724

--
Regards,
Jaroslaw Kadziola


Reply all
Reply to author
Forward
0 new messages