Hello Salem,
Thanks for the response.
void *MyCalloc(size_t size) {
size_t new_size = ((size + 3) & ~0x3);
size_t *result = calloc(1,new_size + sizeof(size_t));
if (...
Type: Posts; User: ashok449
Hello Salem,
Thanks for the response.
void *MyCalloc(size_t size) {
size_t new_size = ((size + 3) & ~0x3);
size_t *result = calloc(1,new_size + sizeof(size_t));
if (...
Hello All,
All I am trying here writting wrapper for calloc() (IAR ARM compiler ) so that I can place size of allocated memory in the first 4 bytes of the memory and use the save while freeing the...
hello All,
I'm trying to debug a program remotely by using gdbserver
gdbserver 150.158.74.131:23456 --attach 15397(pid of my program)
I have successfully debugged the program with host, But...
Actually I have a main program, that creates a Thread, because of unknown reasons the thread is creating another thread (extra) (extra Thread has the Ppid of the earlier thread)
I'm not using any...
Hello All,
I have a program(process) creating a new process after a long run with the PPID of my program(even name was same).
Can I catch this child program using signal handlers?
What all...
Dear All,
I have a char array = "ashok:id:mobile"
now I wanna store "ashok" into a[], "id" into b[] and "mobile" into c[], how can i do that ?
Thanks in advance ....
-Ashok
Thanks for all,
These are all system specific and defined in asm/types.h
thanks ...
below code showing errors
__u32 undeclared
#include <stdio.h>
#include <stdlib.h>
int main()
{
Dear All,
what are __u32, __u16, __u8 ?
typedef struct a
{
__u32 ival;
strtok() worked for me
Thanks ...
Dear All,
how to read read characters till white space
char *a;
a =(char *)malloc(15);
strcpy(a, "rollnumber 449");
yeah, got it .
Thanks
Dear All,
I have an application that reads integer as character and I wanted it as an integer. how to convert the same?
char *pval;
strcpy(pval, "5780");
thanks all, for your great support
here is the entire code,
#include <stdio.h>
#include <string.h>
typedef struct {
char *buffer;
}sample1;
here is updated code
int main(void)
{
sample1 *dev;
dev = ( sample1 * ) malloc(sizeof(sample1));
I tried with
buffer = (char *) malloc(10);
it leads me to other errors, anyone please send back working code
Thanks in advance ...
Dear All,
I am getting Segmentation fault error for below code, how to erase the same.
#include <stdio.h>
#include <string.h>
typedef struct {
zacs7 and brewbuck, you see in this thread I almost provide everything except a clarification which I require. Thats all I need and thats all about a forum is.
If getting sample code from google...
Now, Anyone can give me a small real-time example on semaphore
retval = semop(id, operations, 1);
if retval ==0 then semop is successfull which means I need to place my code here, If so how to aquire/release again.
if(retval ===0)
Ok, here is some code I found on net. Plz tell me how this works.
#include <stdio.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/sem.h>
I have an Idea on Semaphores but dont know how to apply on a real time application.
Dear All,
I am looking for a Sample Semaphore program on linux, Plz help me
Thats great ... Thank you very much
It helped me alot to understand all these.
Thanks ssharish.