help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Memory exaustion or size too large for index


From: José Luis García Pallero
Subject: Re: Memory exaustion or size too large for index
Date: Thu, 25 Feb 2010 13:56:22 +0100

2010/2/25 Jaroslav Hajek <address@hidden>:
> On Thu, Feb 25, 2010 at 1:32 PM, Carlo de Falco <address@hidden> wrote:
>>
>> On 25 Feb 2010, at 13:17, Jaroslav Hajek wrote:
>>
>>>
>>> Interesting, this works for me. What is the value of SIZEOF_LONG on your
>>> system?
>>
>> #include <octave/oct.h>
>> #include <iostream>
>>
>> int main ()
>> {
>>  std::cout << SIZEOF_LONG << std::endl;
>>  return (0);
>> }
>>
>> returns
>>
>> $ /opt/octave/3.3/bin/mkoctfile --link-stand-alone prova.cc
>> $ ./a.out
>> 4
>>
>>> Can you figure out the typedef of size_t on your platform?
>>
>> any hint where to look?
>>
>> c.
>>
>
> Usually it's deep in *** somewhere in the gcc install directory
> /usr/lib/gcc/*/include
> I thought it's figured out by configure but it doesn't seem so.
> Instead you can use template&macro magic to find out:
>
> #include <iostream>
> #include <cstddef>
>
> #define PICK(TYPE) void pick(TYPE) { std::cout << #TYPE << '\n'; }
> PICK(unsigned int)
> PICK(unsigned long)
> PICK(unsigned long long)
> int main ()
> {
>  pick (size_t ());
> }
>
> I expect you get "unsigned long long", right?
>
> --
> RNDr. Jaroslav Hajek, PhD
> computing expert & GNU Octave developer
> Aeronautical Research and Test Institute (VZLU)
> Prague, Czech Republic
> url: www.highegg.matfyz.cz
>
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://www-old.cae.wisc.edu/mailman/listinfo/help-octave
>

But, if size_t would be changed to use unsigned long long as 64 bits
integer. Can be managed in a 32 bits system a memory direction greater
than 2 GB? I suppose that, internally, in Octave a C++ sentence as
matrix[memDir] must be executed, with memDir > 2 GB in this case.

-- 
*****************************************
José Luis García Pallero
address@hidden
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************



reply via email to

[Prev in Thread] Current Thread [Next in Thread]