473,387 Members | 1,891 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

MALLOC: TYPE NAME EXPECTED

Hi all,

I built a softwaare (4 finite elements) and now that i solved all
maths troubles i'm trying to expand some informatic skills.
I call EXE file from cmd (under XP) and i made bad discoveries like
that string for argvector must be not more than 127 chars long...
I solved all except 1 thing:
I'm using Borland TC with compact size for stack dimension (with bigger
sizes EXES raise windows ferocity) and I mallocated dynamic vectors in
usual way...
but is that possible that i can't reach 7*400*sizeof(float)=11200 bytes
I presume without getting memory overflow or application frozen?????
And why i can't succed in writing
int _stklen = desidered dimension;???
Anyone had the same problem under XP?
How to allocate big memory blocks? My program is at least 300 times
faster than Matlab solvers....but as long as i can't work on big
instances this computational power gets useless

Thanks in advance

Nov 21 '06 #1
2 2071
On 20 Nov 2006 19:25:37 -0800, "Poincarč_č_andato"
<ag********@tiscali.itwrote in comp.lang.c:
Hi all,

I built a softwaare (4 finite elements) and now that i solved all
maths troubles i'm trying to expand some informatic skills.
I call EXE file from cmd (under XP) and i made bad discoveries like
that string for argvector must be not more than 127 chars long...
I solved all except 1 thing:
I'm using Borland TC with compact size for stack dimension (with bigger
sizes EXES raise windows ferocity) and I mallocated dynamic vectors in
usual way...
but is that possible that i can't reach 7*400*sizeof(float)=11200 bytes
I presume without getting memory overflow or application frozen?????
And why i can't succed in writing
int _stklen = desidered dimension;???
Anyone had the same problem under XP?
How to allocate big memory blocks? My program is at least 300 times
faster than Matlab solvers....but as long as i can't work on big
instances this computational power gets useless

Thanks in advance
Your problems are entirely compiler specific, and based mainly on the
fact that you are using an antique 16-bit x86 compiler. That is the
reason for the 127 character command line limit, the need to
experiment with "memory models", and limited amounts of memory
available. These are all limitations that are not imposed by the C
language, or even your operating system, but by the use of a compiler
more than 10 years obsolete.

If for some reason you must use this compiler, you need to ask about
such issues in Borland's support groups. For the compiler you are
using, that would be news:borland.public.cpp.turbocpp, and you must
post to it on Borland's server newsgroups.borland.com, because they
don't accept posts from other servers.

A much better solution is just to get a newer, better, 32-bit
compiler. There are many free ones, including Visual Studio 2005 from
Microsoft, a new native win-32 Turbo from Borland (see
http://www.turboexplorer.com/), and various versions of gcc such as
cygwin and mingw.

So get a 21st century compiler and replace the antique.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 21 '06 #2
Tnanks a lot Jack


Jack Klein wrote:
On 20 Nov 2006 19:25:37 -0800, "Poincarč_č_andato"
<ag********@tiscali.itwrote in comp.lang.c:
Hi all,

I built a softwaare (4 finite elements) and now that i solved all
maths troubles i'm trying to expand some informatic skills.
I call EXE file from cmd (under XP) and i made bad discoveries like
that string for argvector must be not more than 127 chars long...
I solved all except 1 thing:
I'm using Borland TC with compact size for stack dimension (with bigger
sizes EXES raise windows ferocity) and I mallocated dynamic vectors in
usual way...
but is that possible that i can't reach 7*400*sizeof(float)=11200 bytes
I presume without getting memory overflow or application frozen?????
And why i can't succed in writing
int _stklen = desidered dimension;???
Anyone had the same problem under XP?
How to allocate big memory blocks? My program is at least 300 times
faster than Matlab solvers....but as long as i can't work on big
instances this computational power gets useless

Thanks in advance

Your problems are entirely compiler specific, and based mainly on the
fact that you are using an antique 16-bit x86 compiler. That is the
reason for the 127 character command line limit, the need to
experiment with "memory models", and limited amounts of memory
available. These are all limitations that are not imposed by the C
language, or even your operating system, but by the use of a compiler
more than 10 years obsolete.

If for some reason you must use this compiler, you need to ask about
such issues in Borland's support groups. For the compiler you are
using, that would be news:borland.public.cpp.turbocpp, and you must
post to it on Borland's server newsgroups.borland.com, because they
don't accept posts from other servers.

A much better solution is just to get a newer, better, 32-bit
compiler. There are many free ones, including Visual Studio 2005 from
Microsoft, a new native win-32 Turbo from Borland (see
http://www.turboexplorer.com/), and various versions of gcc such as
cygwin and mingw.

So get a 21st century compiler and replace the antique.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ryan Mack | last post by:
I'm doing development on an embedded system using a GCC 2.96 MIPS cross compiler and a minimal C standard library replacement. The system loads at startup a base executable. The base executable...
59
by: Steve Zimmerman | last post by:
This program compiles fine, but are there any hidden dangers in it, or is it ok? Experiment 1 ################################################## #include <stdio.h> #include <stdlib.h>...
36
by: MSG | last post by:
The answer is neither. Use macros. #define ALLOC(size, type) ((type) *) malloc((size) * sizeof(type)) #define NEW(type, name, size) (type) * (name) = ALLOC((size), (type)) They are both ...
7
by: Rano | last post by:
/* Hello, I've got some troubles with a stupid program... In fact, I just start with the C language and sometime I don't understand how I really have to use malloc. I've readden the FAQ...
34
by: Alawna | last post by:
Hi, i was reading a chapter about c pointers in "c++builder complete reference" and it is said there that malloc returns a pointer to the start of the memory allocated but i see the prototype of...
6
by: lovecreatesbeauty | last post by:
Hello experts, 1. Does C guarantee the data layout of the memory allocated by malloc function on the heap. I mean, for example, if I allocate a array of 100 elements of structure, can I always...
68
by: James Dow Allen | last post by:
The gcc compiler treats malloc() specially! I have no particular question, but it might be fun to hear from anyone who knows about gcc's special behavior. Some may find this post interesting;...
21
by: Anton Dec | last post by:
Just curious about this... malloc is defined in stdlib.h, right? But if I write a program without #include<stdlib.hand use malloc, it still works as expected. Why is this? Is malloc...
71
by: desktop | last post by:
I have read in Bjarne Stroustrup that using malloc and free should be avoided in C++ because they deal with uninitialized memory and one should instead use new and delete. But why is that a...
23
by: raphfrk | last post by:
I am having an issue with malloc and gcc. Is there something wrong with my code or is this a compiler bug ? I am running this program: #include <stdio.h> #include <stdlib.h> typedef...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.