Search Results

Search: Posts Made By: kbw
Forum: Programming 02-26-2015
6,361
Posted By kbw
getrlimit/setrlimit, That's pretty cool. You...
getrlimit/setrlimit, That's pretty cool. You learn something every day.
Forum: Programming 02-26-2015
6,361
Posted By kbw
"I want to allocate specific heap size for that...
"I want to allocate specific heap size for that process (C program) to run."

I see, I must have been answering the wrong question. Ok, lets start again.

C does have a "virtual machine". In...
Forum: Programming 02-26-2015
6,361
Posted By kbw
I assumed you had an allocator that you wanted to...
I assumed you had an allocator that you wanted to use. In fact, I assumed you had written an allocator that you wanted to use.

At any rate you have to have one in a shared library somewhere and...
Forum: Programming 02-26-2015
6,361
Posted By kbw
Your allocator must have the same interface as...
Your allocator must have the same interface as the standard one, malloc, realloc, calloc, free, ... in your own shared library.

You can then preload your shared library as in:...
Forum: Programming 08-16-2014
2,325
Posted By kbw
It's a call stack. It means the stack starts at...
It's a call stack. It means the stack starts at your function, thread_proxy and crashed in __gcc_cxx::new_allocator, which proceeds to raise an error, which is where it eventually stops.
Forum: Programming 02-14-2013
3,445
Posted By kbw
Why are you moving the object files? If you do,...
Why are you moving the object files? If you do, make will always think the object files are missing and force a rebuild.

I think you should place the makefile and source files in the same...
Forum: Programming 01-17-2013
1,657
Posted By kbw
This sets the character zero (not ASCII zero). ...
This sets the character zero (not ASCII zero).
#include <string.h>

struct ABCD
{
unsigned char abc[6];
unsigned char def;
unsigned char ghi;
};

void abc(struct ABCD* s_tag)
{...
Forum: Programming 01-17-2013
1,657
Posted By kbw
I would not expect that code to compile as def,...
I would not expect that code to compile as def, ghi are dereferenced incorrectly.

Further more, it's not clear what you mean when you say zero. Do you mean ASCII code zero or the character zero? ...
Forum: Programming 01-11-2013
4,178
Posted By kbw
What value do pgm_error->domain and...
What value do pgm_error->domain and pgm_error->code have?
Forum: Programming 01-11-2013
9,300
Posted By kbw
You need to include stdlib.h. The compiler is...
You need to include stdlib.h. The compiler is complaining that it hasn't seen a prototype for exit() before you used it.
Forum: Programming 01-09-2013
1,164
Posted By kbw
To begin with, you should consider this an error:...
To begin with, you should consider this an error:
char* c1 = "Hello";
You're creating a mutable pointer into a constant memory block. It should be:
const char* c1 = "Hello";

When passing...
3,250
Posted By kbw
How about ls | grep '.*\.c$'
How about

ls | grep '.*\.c$'
Forum: Programming 01-01-2013
1,722
Posted By kbw
You haven't said what you want to do with the...
You haven't said what you want to do with the path processing. But you can use strchr() to get each directory or use strrchr() to get to the filename directly.

Regarding your build system, I...
Forum: Programming 12-31-2012
1,047
Posted By kbw
It sounds like you need a middle tier. But you...
It sounds like you need a middle tier. But you really ought to be ask a question here rather than use us as a sounding board.
Forum: Programming 12-10-2012
1,802
Posted By kbw
There's quite a bit wrong with that program. ...
There's quite a bit wrong with that program. Surely you received warnings about what you wrote.

You need to provide prototypes for the POSIX functions you're using, stdio.h for snprintf, ...
...
Forum: Programming 11-27-2012
1,747
Posted By kbw
... and remember to free it when you're done.
... and remember to free it when you're done.
Forum: Programming 11-12-2012
992
Posted By kbw
Where do you specify the object file? I don't...
Where do you specify the object file? I don't think you do.

Use a makefile and forget the shell script unless you're using it to call make.
Forum: Programming 11-02-2012
2,609
Posted By kbw
Every aquired resource needs to be released...
Every aquired resource needs to be released whether if be a block of memeory, a file, an ncurses window ... I would have thought that was obvious.
Forum: Programming 10-31-2012
2,609
Posted By kbw
I ran your code with valgrind. I just ran it up...
I ran your code with valgrind. I just ran it up and selected exit. It listed a bunch of leaks. As far as I can tell, you don't release any of the ncurses objects.

I haven't run a scenario, so...
Forum: Programming 10-28-2012
2,140
Posted By kbw
You can break the message in smaller blocks and...
You can break the message in smaller blocks and encrypt those. That's typically what happens with block cyphers.

If you want to use an asymmetric key pair like RSA to encrypt a whole message,...
Forum: Programming 10-26-2012
1,358
Posted By kbw
If the layout is described by styles describe in...
If the layout is described by styles describe in a CSS, you can apply different CSS to the same page to get different presentations.
Showing results 1 to 21 of 21

 
All times are GMT -4. The time now is 03:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy