Sponsored Content
Full Discussion: malloc vs new speed
Top Forums Programming malloc vs new speed Post 302656751 by Corona688 on Friday 15th of June 2012 10:38:56 AM
Old 06-15-2012
It really depends what's in those constructors.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. Programming

malloc

hello sir since by mentioning a integer pointer and storing the integers by incrementing the pointer value then what is the purpose of malloc? u can decalre it as in t *p; several integers can be stored by incrementing the value of p, hence what is the diffrence between this... (2 Replies)
Discussion started by: rajashekaran
2 Replies

2. Programming

When to use Malloc?

Hi! I hope this is the correct forum to post the question even if I'm a newbie... I am a C-newbie (and really on the edge to be a C-addict ;) ) and have a question. When should I use malloc? To state it differently, when should I NOT use malloc? For instance, if I have an array of... (5 Replies)
Discussion started by: Tonje
5 Replies

3. Filesystems, Disks and Memory

dmidecode, RAM speed = "Current Speed: Unknown"

Hello, I have a Supermicro server with a P4SCI mother board running Debian Sarge 3.1. This is the "dmidecode" output related to RAM info: RAM speed information is incomplete.. "Current Speed: Unknown", is there anyway/soft to get the speed of installed RAM modules? thanks!! Regards :)... (0 Replies)
Discussion started by: Santi
0 Replies

4. Programming

malloc()

Some one please explain me what is Dynamic memory allocation and the use of malloc() function.How do we allocate memory dynamically and also the other way? (3 Replies)
Discussion started by: rash123
3 Replies

5. Filesystems, Disks and Memory

data from blktrace: read speed V.S. write speed

I analysed disk performance with blktrace and get some data: read: 8,3 4 2141 2.882115217 3342 Q R 195732187 + 32 8,3 4 2142 2.882116411 3342 G R 195732187 + 32 8,3 4 2144 2.882117647 3342 I R 195732187 + 32 8,3 4 2145 ... (1 Reply)
Discussion started by: W.C.C
1 Replies

6. UNIX for Advanced & Expert Users

Malloc Implementation in C

Hey Guys Some of my friends have got together and we are trying to write a basic kernel similar to Linux. I am trying to implement the malloc function in C and I am using a doubly linked list as the primary data structure. I need to allocate memory for this link list (duh...) and I don't feel... (2 Replies)
Discussion started by: rbansal2
2 Replies

7. Programming

malloc vs realloc

Why when using realloc, john is reversed 3 times but not the other 2 names ? But if I use malloc, then the 3 names are reversed correctly ? (but then there is a memory leak) How can I reverse all 3 names without a memory leak ? char *BUFFER = NULL; char *STRREVERSE(const char *STRING) {... (5 Replies)
Discussion started by: cyler
5 Replies

8. UNIX for Dummies Questions & Answers

Kmalloc and malloc

Do kmalloc and malloc allocate from same heap ? (3 Replies)
Discussion started by: dragonpoint
3 Replies

9. Programming

help with malloc [solved]

Hi i found code in google how to malloc an 2D array and i tried that : #include<stdio.h> #include<stdlib.h> int **A; int **B; int main(int argc,char *argv) { printf("name of text : %s\n",argv); //read arrays int i,j; int l,m; int M,n; FILE *fp; fp=fopen(argv,"r"); ... (0 Replies)
Discussion started by: giampoul
0 Replies

10. UNIX for Dummies Questions & Answers

Help with malloc()

Good day! I'm a newbie in C. I'm trying to get an unlimited input from the user using malloc then printing the inputs after the user presses enter. My code works, but there's a warning that I don't know how to fix. Please help me. Thank you. Here's my code: #include <stdio.h> #include... (6 Replies)
Discussion started by: eracav
6 Replies
UControl(3U)						    InterViews Reference Manual 					      UControl(3U)

NAME
UControl, UControlInteractor - base classes for menu and button interfaces that work with ControlInfo objects SYNOPSIS
#include <Unidraw/uctrl.h> DESCRIPTION
UControl is an abstract class that augments InterViews' Control base class to deal with Unidraw's ControlInfo objects, which define a key- board equivalent for the control. UControlInteractor is an abstract base class for interactors that base their appearance on the informa- tion in a ControlInfo object. UControl subclasses can use UControlInteractor subclasses to define their appearance. Unidraw-based applications needn't use UControls and UControlInteractors to help define their look and feel if Unidraw's keyboard equiva- lent mechanism is not needed. UCONTROL PUBLIC OPERATIONS
virtual void SetControlInfo(ControlInfo*) ControlInfo* GetControlInfo() Assign and retrieve the UControl's ControlInfo object. UCONTROL PROTECTED OPERATIONS
UControl(ControlInfo*) UControl(const char*, ControlInfo*) UControl provides protected constructors that let subclasses initialize the ControlInfo object and optionally specify their instance name. UCONTROLINTERACTOR PUBLIC OPERATIONS
virtual void SetControlInfo(ControlInfo*) ControlInfo* GetControlInfo() Assign and retrieve the UControlInteractor's ControlInfo object. virtual void Highlight(boolean) The UControlInteractor's appearance is defined by a Graphic object, which it builds from information in its ControlInfo object. By default, UControlInteractor highlights itself by drawing this graphic with its foreground and background colors reversed. UCONTROLINTERACTOR PROTECTED OPERATIONS
UControlInteractor(ControlInfo*) UControlInteractor() UControlInteractor defines two protected constructors. One takes the ControlInfo object to use as an argument. This constructor also initializes the UControlInteractor's _label protected member by calling InitLabel (described below) with the ControlInfo object. The parameterless constructor initializes _label to nil. Both constructors initialize the UControlInteractor's _picture protected member to point to an instance of a Picture object, which defines the UControlInteractor's appearance. virtual void Invert() Invert reverses _picture's colors without drawing it. Graphic* InitLabel(ControlInfo*) Create a graphic from the information stored in a ControlInfo object that defines the UControlInteractor's appearance. This opera- tion creates a GraphicView of the ControlInfo's GraphicComp and returns a copy of the view's graphic. SEE ALSO
Control(3I), ControlInfo(3U), Graphic(3U), GraphicComp(3U), GraphicView(3U), KeyMap(3U) Unidraw 20 November 1990 UControl(3U)
All times are GMT -4. The time now is 09:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy