Go to Post Doesn't matter what you use if you can't drive it. - efoote868 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 25-11-2009, 13:26
Iconē Iconē is offline
Registered User
no team
 
Join Date: Nov 2009
Location: German
Posts: 1
Iconē is an unknown quantity at this point
Dynamic Memory

Hello,
is it possible to allocate dynamically memory using the intelitek easy c? While programming C in windows you use malloc and free, but those are declared in the standart windows header (stdlib.h), so they wont work. Are there any similar commands/functions in easy c ?

And my second Question. Is there in easy c a function like GetTickCount in windows? Its a function which returns the milliseconds since the PC was started.

edit: Sry i've post it in the wrong forum, maybe a moderator could change this thank you.

Thank you for answering!
Greets Iconē

Last edited by Iconē : 26-11-2009 at 03:21. Reason: Wrong Forum
  #2   Spotlight this post!  
Unread 20-12-2009, 21:12
slavik262's Avatar
slavik262 slavik262 is offline
We do what we must because we can.
AKA: Matt Kline
FRC #0537 (Charger Robotics)
Team Role: Alumni
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Sussex, WI
Posts: 310
slavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to beholdslavik262 is a splendid one to behold
Send a message via AIM to slavik262
Re: Dynamic Memory

First of all, stdlib.h is part of the C Standard Library, and should exist on all C platforms. It has nothing to do with Windows. I remember something about Easy C not having implementations for dynamic memory management due to the very small scale of platforms they target.

To answer your second question, there's a header called time.h (or ctime if you're compiling in C++). In it there's a function called clock() which returns a value of type clock_t for how long the program has been running. To convert this into seconds, there is also a definition in clock.h called CLOCKS_PER_SEC which evaluates to the number of clock_t's per second. On the Windows platforms I've compiled on so far, CLOCKS_PER_SEC is 1000, meaning each clock_t value is a milisecond.

Feel free to PM me if I can help you in any other way, and welcome to Chief Delphi.
__________________

Last edited by slavik262 : 20-12-2009 at 21:19. Reason: Added additional info.
  #3   Spotlight this post!  
Unread 27-12-2009, 08:00
Kingofl337's Avatar
Kingofl337 Kingofl337 is offline
You didn't see anything....
AKA: Adam
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Feb 2005
Rookie Year: 1998
Location: Manchester, NH
Posts: 861
Kingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond reputeKingofl337 has a reputation beyond repute
Send a message via Yahoo to Kingofl337
Re: Dynamic Memory

You can include studio.h in easyC I'm not sure if malloc is in it.

If you look om API.h there are some undocumented timer / clock functions. Otherwise you could just start a timer. See the help file for use of timers.
__________________
FIRST Team 501 PowerKnights - Mentor
FIRST Team 40 Checkmate - Mentor Alum
FIRST Team 146 Blue Lightning - Alumni
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic memory MC18 Cadyyan Programming 3 18-08-2009 17:15
Dynamic Memory Allocation Woes slavik262 Programming 7 12-02-2008 16:15
Dynamic Tables in PHP FRANK(WGH) Website Design/Showcase 12 09-07-2007 16:07
IFI Dynamic Debug Tool fowlerm Programming 0 25-08-2005 16:18
Dynamic Debugging Tool MarkVH Programming 5 04-02-2005 18:09


All times are GMT -5. The time now is 02:00.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi