hi this is my realloc function
i have replaced all malloc/realloc by my_realloc.
i am free ing memory at realloc.
-----------------------------------------------------------------------------------------
char* my_realloc (void * current, int size)
{
char * temp;
temp = malloc(size);
if(temp == NULL) return NULL;
if(current == NULL) return temp;
memcpy(temp, current,...
User Profile
Collapse
-
hi banfa. thank you for the answer. yes it works fine twice always. but wen it is called 3rd time it gives assertion error.
"However it could mean that another piece of your program is writing outside the bounds of valid data objects and overwriting and corrupting the pointers you hold which the MSC++ debug heap then detects when you try to free the memory blocks."
yes. thats why it gives me assertion error with...Leave a comment:
-
i bypassed realloc. used malloc and copying existing block to new memory manually.
but i want to know whts wrong with realloc.
now i am facing another assertion error with free()
file : dbgheap.c
line 1017
expression :
_BLOCK_TYPE_IS_ VALID(pHead->nBlockUse)
in watch window i can see the pointer i want to free is a valid pointer.Leave a comment:
-
-
realoc failed
i am using realloc several times for the same pointer.
it does allocate memory 1-2 times and then throws an error debug assertion failed.
file: dbgheap.c
line : 609
expression : _CtrIsValidHeap Pointer(pUserDa ta)
at this line in code.
cp->class2q->enqptr = (qptr*)realloc( cp->class2q->enqptr,
sizeof(cir_q)*( cp->class2q->count... -
hi,
there are no .lib files in lib folder.
now i need to build libraries. right??
how to do that??Leave a comment:
-
thanks guys.
nmake runs successfully.
this is final message.
link /NOLOGO /INCREMENTAL:NO /SUBSYSTEM:conso le /OUT:..\bin\qmak e.exe @C
:\DOCUME~1\ADMI NI~1\LOCALS~1\T emp\nm20.tmp
alright??
now i made a 'hello' project.
set include directory.
build errors:
1>------ Build started: Project: hello, Configuration: Debug Win32 ------
1>Performing Makefile...Leave a comment:
-
hi banfa,
i did it. now it gives error
.\option.cpp(69 8) : fatal error C1083: Cannot open include file: 'windows.h': No
such file or directory
Generating Code...
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 9.0\
...Leave a comment:
-
when i installed qt it asked for mingw. so, i added bin files. but even if i don't add it it still gives error.
i tried installing qt again. after 'configure', when i run nmake/make it says
nmake is not recognized.Leave a comment:
-
qt with vc++
hi, i am trying qt with visual studio. hello world program.
here are the errors.
>Performing Makefile project actions
1>'mingw32-make' is not recognized as an internal or external command,
1>operable program or batch file.
1>Project : error PRJ0002 : Error result 1 returned from 'C:\WINDOWS\Sys Wow64\cmd.exe'.
1>Build log was saved at "file://c:\Documents and Settings\Admini strator\My... -
-
problem with setupcomm
hi group,
i'm reading 100 bytes at a time from com1. this is a continuous loop.
every time entering the loop it will connect to port (makefile, setupcomm) n terminate conection while leaving the loop.
sometimes i can read the data n sometime it gives error setup com failed. getlast error returns error code 995.
setupcomm fails regularly. once in 2-3 reads.data is coming at 115200bps.
whts the reason. if setupcomm... -
ok. let me state my problem newly.
my client n server can send n receive data from labview's udp port. but not to each other.as, it can communicate with labview, the code is correct. but i can not send data through this c application. n i can not figure out why.Leave a comment:
-
-
hi shreeram,
i tried. no luck. :(
r u sure the code is correct?Leave a comment:
-
same prob with tcp
i eve tried tcp client- server. same problem! :(
works with loop back address n not with network addresses.Leave a comment:
-
yes sure andr3w. here is my code.
...Code://///////// client.cpp //////////////////// #include <iostream> #include <winsock2.h> using namespace std; #define SERVER_PORT 3000 #define BUF_SIZE 4096 // block transfer size #define QUEUE_SIZE 20 #define IPAddress "127.0.0.1" // Local to the system - Loop back address //#define
Leave a comment:
-
i couldn't find a solution for it yet. i have searched on net also. does anybody have a idea where shall i search for the solution at least?
thnksLeave a comment:
-
socket programming
hello group,
i'm trying udp socket program. my code works fine with local host ip. i.e 127.0.0.1
according to my knowledge, if i change the ip address n give remote host's ip, two machines should communicate. it doesn't work. after runing server i checked port engaged with netstat. it shows perticular port in use.
please tell is there an other settings that i should look for?
thenk you. -
horace1, can you please tell me why is it not working with network ip address?
Instead of loop back address i will have give another machines IP address. n it shoulld communicate. but server is not responding. it gets hung on Recvfrom().Leave a comment:
No activity results to display
Show More
Leave a comment: