POV-Ray : Newsgroups : povray.programming : array question : Re: array question Server Time
5 Jul 2024 14:40:47 EDT (-0400)
  Re: array question  
From: Warp
Date: 20 Sep 2003 06:42:58
Message: <3f6c2f32@news.povray.org>
Ricky Reusser <ple### [at] emailcom> wrote:
>         So here's the question.  How do I create a large array without getting a
> signal 11 (sigsegv) error?  It makes sense that there are size limitations
> on arrays, but if I wanted to create a 100x100x100 array of floats, how
> would I do that?  I seem to remember something like an array of 100
> pointers to 100x100 arrays, but I don't remember it well enough to
> duplicate it.

  You failed to provide vital information about your system:

  - Your computer type (PC? Mac? Sparc? Another?) and OS.
  - The compiler you are using.
  - A short piece of code you are trying but is causing the problem.


  100*100*100*4 is only 3.8 megabytes so it shouldn't be any problem in
any current OS with any current compiler. Your code is probably just buggy.

  Btw, there's no need to use an array of pointers to arrays of pointers
to arrays. That will only consume lots of memory for no useful purpose
and will be extremely error-prone with regard to memory
allocation/deallocation (unless you do it in an object-oriented way,
but as you said that you are not really coding in C++...).

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.