Yes, is C source!?!

----- Mensagem original ----
De: Vivian Chen <[EMAIL PROTECTED]>
Para: Palm Developer Forum <[email protected]>
Enviadas: Terça-feira, 22 de Abril de 2008 23:04:34
Assunto: Re:  How to allocate more than 64KB?

DIV {
MARGIN:0px;}
   _filtered {
font-family:宋体;
}
 _filtered {
font-family:Verdana;
}
 _filtered {

}
 _filtered {margin:72.0pt 90.0pt 72.0pt 90.0pt;}
P.MsoNormal {
FONT-SIZE:10.5pt;MARGIN:0cm 0cm 0pt;FONT-FAMILY:"Times New 
Roman";TEXT-ALIGN:justify;}
LI.MsoNormal {
FONT-SIZE:10.5pt;MARGIN:0cm 0cm 0pt;FONT-FAMILY:"Times New 
Roman";TEXT-ALIGN:justify;}
DIV.MsoNormal {
FONT-SIZE:10.5pt;MARGIN:0cm 0cm 0pt;FONT-FAMILY:"Times New 
Roman";TEXT-ALIGN:justify;}
A:link {
COLOR:blue;TEXT-DECORATION:underline;}
SPAN.MsoHyperlink {
COLOR:blue;TEXT-DECORATION:underline;}
A:visited {
COLOR:purple;TEXT-DECORATION:underline;}
SPAN.MsoHyperlinkFollowed {
COLOR:purple;TEXT-DECORATION:underline;}
SPAN.EmailStyle17 {
FONT-WEIGHT:normal;COLOR:windowtext;FONT-STYLE:normal;FONT-FAMILY:Verdana;TEXT-DECORATION:none;}
DIV.Section1 {
}
UNKNOWN {
FONT-SIZE:10pt;}
What's this code? Is it the 

open source?
 
 
2008-04-23 
Vivian Chen 
发件人: Israel Lins Albuquerque 
发送时间: 2008-04-23  00:06:58 
收件人: Palm Developer Forum 
抄送: 
主题: Res: How to allocate more than 64KB? 
 
#if        defined (__palmosarm__)
    #include <PalmOneARM.h>
    #include <MemoryMgr.h>

#elif    defined (__palmos__)
    #include <PalmOS.h>
    SysAppInfoPtr SysGetAppInfo(SysAppInfoPtr *uiAppPP, SysAppInfoPtr 
*actionCodeAppPP) SYS_TRAP(sysTrapSysGetAppInfo);
    #define memNewChunkFlagAllowLarge 0x1000

#endif

static void *large_malloc(unsigned long size) {
    unsigned long ownerID;
    #if        defined (__palmosarm__)
        SysAppInfoV50Type *blankAppInfoP = NULL;

    #elif    defined (__palmos__)
        SysAppInfoPtr blankAppInfoP;

    #endif

    ownerID = SysGetAppInfo(&blankAppInfoP, &blankAppInfoP)->memOwnerID;

    return MemChunkNew(0, size, ownerID | memNewChunkFlagNonMovable | 
memNewChunkFlagAllowLarge);
}

----- Mensagem original ----
De: Vivian Chen <[EMAIL PROTECTED]>
Para: Palm Developer Forum <[email protected]>
Enviadas: Terça-feira, 22 de Abril de 2008 4:27:18
Assunto: RE: How to allocate more than 64KB?

.hmmessage P {
PADDING-RIGHT:0px;PADDING-LEFT:0px;PADDING-BOTTOM:0px;MARGIN:0px;PADDING-TOP:0px;}
BODY.hmmessage {
FONT-SIZE:10pt;FONT-FAMILY:Tahoma;}
UNKNOWN {
FONT-FAMILY:宋体;}
UNKNOWN {
FONT-FAMILY:Verdana;}
UNKNOWN {

}
UNKNOWN {
MARGIN:72pt 90pt;}
P.MsoNormal {
FONT-SIZE:10.5pt;MARGIN:0cm 0cm 0pt;FONT-FAMILY:"Times New 
Roman";TEXT-ALIGN:justify;}
LI.MsoNormal {
FONT-SIZE:10.5pt;MARGIN:0cm 0cm 0pt;FONT-FAMILY:"Times New 
Roman";TEXT-ALIGN:justify;}
DIV.MsoNormal {
FONT-SIZE:10.5pt;MARGIN:0cm 0cm 0pt;FONT-FAMILY:"Times New 
Roman";TEXT-ALIGN:justify;}
A:link {
COLOR:blue;TEXT-DECORATION:underline;}
SPAN.MsoHyperlink {
COLOR:blue;TEXT-DECORATION:underline;}
A:visited {
COLOR:purple;TEXT-DECORATION:underline;}
SPAN.MsoHyperlinkFollowed {
COLOR:purple;TEXT-DECORATION:underline;}
SPAN.EmailStyle17 {
FONT-WEIGHT:normal;COLOR:windowtext;FONT-STYLE:normal;FONT-FAMILY:Verdana;TEXT-DECORATION:none;}
DIV.Section1 {

}
UNKNOWN {
FONT-SIZE:10pt;}
But I've call MemHeapFreeBytes() to 

get the largest chunk, it's also larger than 1M.
 
Can I allocate in this chunk?
 
 
2008-04-22 
Vivian Chen 
发件人: Chris APERS 
发送时间: 2008-04-22  15:18:48 
收件人: Palm Developer Forum 
抄送: 
主题: RE: How to allocate more than 64KB? 

If you have only 1.9M there are some chances that you cannot allocate 1M 
because you may not have a contiguous memory segment which fit in 1M.



    Date: Tue, 22 Apr 2008 12:46:56 +0800
From: [EMAIL PROTECTED]
To:   [email protected]
Subject: Re: How to allocate more than   64KB?

  UNKNOWN {

}
.ExternalClass P.EC_MsoNormal {
FONT-SIZE:10.5pt;FONT-FAMILY:'Times New Roman';TEXT-ALIGN:justify;}
.ExternalClass LI.EC_MsoNormal {
FONT-SIZE:10.5pt;FONT-FAMILY:'Times New Roman';TEXT-ALIGN:justify;}
.ExternalClass DIV.EC_MsoNormal {
FONT-SIZE:10.5pt;FONT-FAMILY:'Times New Roman';TEXT-ALIGN:justify;}
.ExternalClass A:link {
COLOR:blue;TEXT-DECORATION:underline;}
.ExternalClass SPAN.EC_MsoHyperlink {
COLOR:blue;TEXT-DECORATION:underline;}
.ExternalClass A:visited {
COLOR:purple;TEXT-DECORATION:underline;}
.ExternalClass SPAN.EC_MsoHyperlinkFollowed {
COLOR:purple;TEXT-DECORATION:underline;}
.ExternalClass SPAN.EC_EmailStyle17 {
FONT-WEIGHT:normal;COLOR:windowtext;FONT-STYLE:normal;FONT-FAMILY:Verdana;TEXT-DECORATION:none;}
.ExternalClass DIV.EC_Section1 {

}
.ExternalClass EC_UNKNOWN {
FONT-SIZE:10pt;}
.ExternalClass BLOCKQUOTE {
MARGIN-BOTTOM:0px;MARGIN-LEFT:2em;}
.ExternalClass OL {
MARGIN-BOTTOM:0px;}
.ExternalClass UL {
MARGIN-BOTTOM:0px;}
BLOCKQUOTE {
MARGIN-TOP:0px;MARGIN-BOTTOM:0px;MARGIN-LEFT:2em;}
OL {
MARGIN-TOP:0px;MARGIN-BOTTOM:0px;}
UL {
MARGIN-TOP:0px;MARGIN-BOTTOM:0px;}
  yes, about 1.9M. But I try to 

  allocate 1M , it still failed.
   
   
  2008-04-22 
      Vivian Chen   
      发件人: Luc Le Blanc 
  发送时间: 2008-04-22    12:42:08 
  收件人: Palm Developer Forum   
  抄送: 
  主题: re: How to allocate more   than 64KB? 
  
    Vivian Chen wrote:
  
  > I want to allocate more than 64KB, how can I do?
   
  > I try to call MemGluePtrNew(), but it return 0x00000000(failed).
   
  > My program is:
   
  > unsigned long size = 1024ul*1024ul*2;
  > void* p = MemGluePtrNew(size);        //return failed
   
  > Why?
  
  That's 2Mb. Did you check the free heap space before?
  
  
  Luc Le Blanc
  -- 
  For information on using the ACCESS Developer Forums, or to unsubscribe, 
please see http://www.access-company.com/developers/forums/


-- 

For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/
Avec Windows Live Messenger restez en contact avec tous vos amis ! Téléchargez 
Messenger, c'est gratuit !
-- 

For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

-- 

For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/



Abra sua conta no Yahoo! 

Mail, o único sem limite de espaço para armazenamento! 
-- 

For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

-- 

For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/





      Abra sua conta no Yahoo! Mail, o único sem limite de espaço para 
armazenamento!
http://br.mail.yahoo.com/
-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to