Hello,
I've got some Problems with a Programm.
I use a Grid with Nodes. The Grid will be 64 * 64 Nodes huge.
Each Node is a float. Some Algorithms ha've to copy the whole
Grid, sometimes twice. If this happens, the code crashes. I've
to choose a smaller Grid Spacing from 32 * 32 Grid Nodes, or less.
Who can I use more Memory?
I use vector, just because I read that indexed access is fast.
An Ordinary float * is possible, but the Program crashes earlier.
I've no Memory Leaks, I guess!
Thanks for any Help!
Simon
--
QOTD:
Sacred cows make great hamburgers. 5 1483
"Simon Adler" <si***@wohnheim .fh-wedel.de> wrote in message
news:slrncm7knm .6eg.si***@wohn heim.fh-wedel.de... Hello,
I've got some Problems with a Programm. I use a Grid with Nodes. The Grid will be 64 * 64 Nodes huge. Each Node is a float. Some Algorithms ha've to copy the whole Grid, sometimes twice. If this happens, the code crashes. I've to choose a smaller Grid Spacing from 32 * 32 Grid Nodes, or less.
I think you have a bug in your program.
Who can I use more Memory?
64*64*sizeof(fl oat) is not a lot of memory, I don't think that is your
problem.
I use vector, just because I read that indexed access is fast. An Ordinary float * is possible, but the Program crashes earlier.
Right, you have a bug somewhere, probably nothing to do with the size of the
vector.
I've no Memory Leaks, I guess!
Guessing isn't good enough. But this doesn't sound like a memory leak, it
sounds like a plain old bug.
Thanks for any Help!
Post some code, if it's not too much.
john
Simon Adler wrote: Hello,
I've got some Problems with a Programm. I use a Grid with Nodes. The Grid will be 64 * 64 Nodes huge. Each Node is a float. Some Algorithms ha've to copy the whole Grid, sometimes twice. If this happens, the code crashes. I've to choose a smaller Grid Spacing from 32 * 32 Grid Nodes, or less.
Who can I use more Memory? I use vector, just because I read that indexed access is fast. An Ordinary float * is possible, but the Program crashes earlier. I've no Memory Leaks, I guess!
Thanks for any Help!
How do you expect us to help you if you don't show any code that causes
the crash? Please post the smallest, complete and compilable program
that exhibits your problem.
See also: http://www.slack.net/~shiva/welcome.txt
BTW: 64 * 64 floats doesn't occupy that much memory so probably the
problem has nothing to do with using too much memory.
--
Peter van Merkerk
peter.van.merke rk(at)dse.nl
Simon Adler wrote: Hello,
I've got some Problems with a Programm. I use a Grid with Nodes. The Grid will be 64 * 64 Nodes huge. Each Node is a float. Some Algorithms ha've to copy the whole Grid, sometimes twice. If this happens, the code crashes. I've to choose a smaller Grid Spacing from 32 * 32 Grid Nodes, or less.
Who can I use more Memory? I use vector, just because I read that indexed access is fast. An Ordinary float * is possible, but the Program crashes earlier. I've no Memory Leaks, I guess!
In short: Please post code!
Medium: Talk is cheap, show me the code!
Politically Correct: Please post the smallest compilable code experiencing
the error.
Sacred cows make great hamburgers.
I did not know they can cook.
--
Attila aka WW
> I've got some Problems with a Programm. I use a Grid with Nodes. The Grid will be 64 * 64 Nodes huge. Each Node is a float. Some Algorithms ha've to copy the whole Grid, sometimes twice. If this happens, the code crashes. I've to choose a smaller Grid Spacing from 32 * 32 Grid Nodes, or less.
Who can I use more Memory? I use vector, just because I read that indexed access is fast. An Ordinary float * is possible, but the Program crashes earlier. I've no Memory Leaks, I guess!
64x64xfloat is not very much (32 KB). So there is clearly a bug in your
code.
You have to post some code to get specific help.
Otherwise try to use a debugger and/or a boundschecker.
Niels Dybdahl
Simon Adler posted: Hello,
I've got some Problems with a Programm. I use a Grid with Nodes. The Grid will be 64 * 64 Nodes huge. Each Node is a float. Some Algorithms ha've to copy the whole Grid, sometimes twice. If this happens, the code crashes. I've to choose a smaller Grid Spacing from 32 * 32 Grid Nodes, or less.
Who can I use more Memory? I use vector, just because I read that indexed access is fast. An Ordinary float * is possible, but the Program crashes earlier. I've no Memory Leaks, I guess!
Thanks for any Help!
Simon
Line 15, you misspelled "vector".
-JKop This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: {AGUT2}=IWIK= |
last post by:
Hello all,
It's my fisrt post here and I am feeling a little stupid here, so go easy..
:) (Oh, and I've spent _hours_ searching...)
I am desperately trying to read in an ASCII "stereolithography" file (*.STL)
into my program. This has the following syntax...
Begin STL Snippet
**********
|
by: ArShAm |
last post by:
Hi there
In this code , I need a huge table , but for numbers more than 259025 it
crashes , why?
How to fix that problem?
void main(void)
{
int Sorted;
Sorted = 1;
}
|
by: Forecast |
last post by:
I run the following code in UNIX compiled by g++ 3.3.2 successfully.
: // proj2.cc: returns a dynamic vector and prints out at main~~
: //
: #include <iostream>
: #include <vector>
:
: using namespace std;
:
: vector<string>* getTyphoon()
|
by: Adam Hartshorne |
last post by:
Hi All,
I have the following problem, and I would be extremely grateful if
somebody would be kind enough to suggest an efficient solution to it.
I create an instance of a Class A, and "push_back" a copy of this into a
vector V. This is repeated many times in an iterative process.
Ok whenever I "push_back" a copy of Class A, I also want to assign a
pointer contained in an exisiting instance of a Class B to this
|
by: Bob |
last post by:
Here's what I have:
void miniVector<T>::insertOrder(miniVector<T>& v,const T& item)
{
int i, j;
T target;
vSize += 1;
T newVector;
newVector=new T;
| |
by: Ross A. Finlayson |
last post by:
I'm trying to write some C code, but I want to use C++'s std::vector.
Indeed, if the code is compiled as C++, I want the container to
actually be std::vector, in this case of a collection of value types or
std::vector<int>.
So where I would use an int* and reallocate it from time to time in C,
and randomly access it via , then I figure to copy the capacity and
reserve methods, because I just need a growable array.
I get to considering...
|
by: Martin Jørgensen |
last post by:
Hi,
I get this using g++:
main.cpp:9: error: new types may not be defined in a return type
main.cpp:9: note: (perhaps a semicolon is missing after the definition
of 'vector')
main.cpp:9: error: two or more data types in declaration of 'set'
I don't really see the problem... Here's the code:
|
by: busnet |
last post by:
Hi.
I've got the following problem: I have a huge xml-file that represents
a street map of a city. Each street is stored as a couple of
coordinates (start, end and all the turns).
When I set a marker in a google map, I want to find all streets that
are near this marker position.
I now parse the whole file as a simpleXML object, and calculate the
distances to each street segment (using linear algebra algorithms,
that is, constructing the...
|
by: Bernhard Reinhardt |
last post by:
Hi,
I read data from a file into a 4 dimensional array. The data has a size
of 5MB (could later be up to 500MB). I want to pass the matrix to
subroutines.
What is the cleverst (and for a beginner easies) way to do so?
I read a bit about pointers on the web and in books but the examples do
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |