I have to conclude that the problem must be with the execution engine (since
we were told at some point if memory serves me right, that IL is not
JIT-compiled on CF)
By the way - your array is not 255 string items, but 8x256 = 2048 string
items. When reduced to 1480, it works
Alex
"Oren Novotny" <o...@NOpo.SPcwru.AMedu> wrote in message
news:ugl8taUC...@TK2MSFTNGP10.phx.gbl...
> I am trying to create an OTP[1] client for PPC. I have custom MD4 and MD5
> implementations that are "pure" C# code, so that part is out of the way.
> The trouble is that one of the static member variables in the OTP class is
> causing a NotSupportedException to be thrown upon initialization.
>
> If I try to access a static function, I get it, or if I try to create a
> new
> instance of the class, I get it as well. I don't see what would be
> causing
> this; the only thing getting initialized is a fairly large array (well,
> only
> 255 string items).
>
> Any ideas?
>
> [1]: http://www.ietf.org/html.charters/otp-charter.html
>
> (This is my first post via the "Managed" mechanism of MSDN--I registered
> the
> spam alias, so if this isn't the place, please let me know).
>
> Thanks!
> --Oren
>
>
>
Thanks for looking into this (it was late last night so my math was a bit
off ;)). The question is, is what to do in the interim. The contents of
that array need to be in the program in that order since that's what is
defined by the spec.
Assuming that half of the items are three characters and the remaining are
four, and assuming 2 bytes per character, I get a total of 14K of memory.
So that's not even a particularly large item.
Would it help to stick all the items into an ArrayList? Would
static/instance make a difference (I ported a java version, so I didn't
bother mucking with the underlying structure/logic--I think they used it as
a static method just so that the array would only have to be in memory
once.)
I did notice that the executable worked on the desktop, so I was rather
surprised.
I look forward to finding a solution :)
--Oren
"Alex Feinman" <publi...@alexfeinman.com> wrote in message
news:#N1Q5PWC...@TK2MSFTNGP12.phx.gbl...
You might want to consider attempting to load these strings from a file, or
from an embedded resource. You could even, potentially, break the
instantiation of your array into several functions.
Loading the strings from a file or embedded resource would be cleaner, but
using multiple functions would likely be higher performance.
I hope this helps.
Jeremy Hance
NET Compact Framework
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Oren Novotny" <o...@NOpo.SPcwru.AMedu>
| References: <ugl8taUC...@TK2MSFTNGP10.phx.gbl>
<#N1Q5PWC...@TK2MSFTNGP12.phx.gbl>
| Subject: Re: NotSupportedException on static constructor?
| Date: Wed, 23 Apr 2003 06:52:14 -0400
| Lines: 80
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3790.0
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Message-ID: <OF4hnZYC...@TK2MSFTNGP11.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: 97.37.171.66.subscriber.vzavenue.net 66.171.37.97
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:21370
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
Would it be possible for the compiler to throw a warning in cases where the
JIT'd code would surpass those limitations? It would seem to be one of
those things that's easy to do by accident but hard to determine the cause
later.
--Oren
"Jeremy Hance [MSFT]" <jhanc...@online.microsoft.com> wrote in message
news:EK5lXffC...@cpmsftngxa06.phx.gbl...
Jeremy Hance
NET Compact Framework
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Oren Novotny" <o...@NOpo.SPcwru.AMedu>
| References: <ugl8taUC...@TK2MSFTNGP10.phx.gbl>
<#N1Q5PWC...@TK2MSFTNGP12.phx.gbl>
<OF4hnZYC...@TK2MSFTNGP11.phx.gbl>
<EK5lXffC...@cpmsftngxa06.phx.gbl>
| Subject: Re: NotSupportedException on static constructor?
| Date: Wed, 23 Apr 2003 21:21:38 -0400
| Lines: 159
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.3790.0
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Message-ID: <O6ROc$fCDHA...@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: 97.37.171.66.subscriber.vzavenue.net 66.171.37.97
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:21494
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
Maybe for Whidbey ;)
--Oren
"Jeremy Hance [MSFT]" <jhanc...@online.microsoft.com> wrote in message
news:$mmhxi3C...@cpmsftngxa06.phx.gbl...