aldweb

Fermer I. aldweb

Fermer II. Gratuitiels PC

Fermer III. Gratuitiels Palm

Fermer IV. Partagiciels Palm

Fermer V. iziBasic Palm

Fermer VI. Connaissance Palm

Fermer VII. Ordinateur Poche

Fermer VIII. miniPortail

Spécial !



Version mobile
de l'aldweb Site

m.aldweb.com


Ni Français, ni Anglais ?

Essayez donc l'un de ces drapeaux :
[de] [es] [it] [pt]
Recherche




Météo / Spam / www

Météo Lyon


aldweb contre le SPAM


Newsletter
Pour avoir des nouvelles de ce site, inscrivez-vous à notre Newsletter.
S'abonner
Se désabonner
298 Abonnés
Sites web de la famille

Webmaster - Infos
News Amis
Visites

   visiteurs

   visiteurs en ligne

Sondage
Comment trouve-tu le nouvel habillage de l'aldweb Site ?
 
Superbe !
Joli
Moyen
Moche...
Résultats
forum.gifForum - iziBasic - Sujet n°1145

Forum - Forum
iziBasic - iziBasic


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257

actif  Sujet n° 1145  Problem with PP call?

le 05/03/2005 @ 18:05
par Steven

Anonyme



I'm working on a program that plots a bitmap at 160x160 or 320x320. The plots took too long in iziBasic (but much faster than PocketC ) so I coded the appropriate functions using PP. While I was developing the PP code I kept everything at 160x160 and everything worked well. Once I had everything working I changed one array in PP from 160 bytes to 320 bytes. Now it works but when I exit the iziBasic program I get

"MemoryMgr.c, Line:3757,
Invalid chunk ptr".

It happens whether I plot at 160x160 or 320x320. I don't understand how changing the array size affects this; 320 bytes isn't all that much! Any ideas?
Ecrire à Steven   Poster une réponse  Haut

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 1
--------
le 05/03/2005 @ 20:18
par aldweb

Anonyme

visiteur
Hello Steven,

Thanks for confirming that iziBasic is much faster than PocketC. This was quite expected anyway (see here: Bench2 analysis).

Without having a look at your PP source code, it is quite hard to help you.

You talk of a 320 bytes size change.
But, as from reading you, I understand that:
1. a 160x160 byte array is a 25,600 bytes long array, roughly 25 KB.
2. a 320x320 byte array is a 102,400 bytes long array, roughly 100 KB, so 4 times bigger than the previous one!
And it overpasses the 64 KB common segment size on Palm OS or the 32 KB data segment size of PP.

Cheers

@+
aldweb
Ecrire à aldweb   Poster une réponse  Haut

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 2
--------
le 05/03/2005 @ 22:54
par Steven

Anonyme

visiteur
I explained badly, it's not a 2 dimensional array. Only one dimension, so 160 bytes or 320 bytes plus there are two of them so 320 or 640. I changed my arrays from integer to UInt8 and it appears to be working, but let me ask a question. If I have a procedure defined prior to my CallPP function as:

type
myarray = array[0..320] of UInt8;

procedure myprocedure( var array1 : myarray);

.
.
.
function CallPP(.....);

Is this a problem?
Ecrire à Steven   Poster une réponse  Haut

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 3
--------
le 05/03/2005 @ 23:57
par aldweb

Anonyme

visiteur
The PP integer type is a 32 bits integer type and it uses 4 bytes, when a byte (UInt8) uses 1 byte (2nd case seems obvious!).
So, array[0..320] is 321 bytes big, when it was 321x4=1284 bytes before.

We will have to check how much space of local variables is given in a PP module, out of the 32KB global variables space which is reserved by iziBasic.

You may very well declare many procedures and functions before the CallPP function itself.

Cheers

@+
aldweb
Ecrire à aldweb   Poster une réponse  Haut
actif sujet actif   clos sujet clos   Important! Important!   Nouveau Nouveau message   -   Rectifier Rectifier message   Clôturer Clôturer sujet   Remonter Remonter
[]
Catégories de discussion  Forum 



 
^ Haut ^