C Board  

Go Back   C Board > General Programming Boards > C Programming

Reply
 
LinkBack Thread Tools Display Modes
Old 06-18-2008, 06:40 AM   #1
Registered User
 
Join Date: Jun 2008
Posts: 8
Extending C program to support modules

Hi everyone,
I hope you don't scrutinise me too much based on my post count, but anyway. I have been trying to find a method to use a module like system in my software. Its using modified images streamed from a video so there has to be a fast exchange between the core and the modules.

I have written the program in C, and I have considered using Inter-Process Communication (IPC) to do the job, I also came across this proposed method from std-org [pdf].

The first method might be memory intensive as the data is duplicated between processes, where as the latter method seems to be checking the workable directory and loading the shared library at runtime thus keeping the same process. As I can already see a trade off between memory and thread separation I wanted to know if there are alternatives to consider.

So can anyone recommend a high performance strategy to achieve results close to a compile in module?

PS: I am not too concerned about multi-platform support as I am working only in Linux, and I do not have any dependencies on other libraries (hoping to maintain that if possible)
lordmule is offline   Reply With Quote
Old 06-18-2008, 10:02 AM   #2
Registered User
 
Join Date: May 2008
Posts: 54
Quote:
Originally Posted by lordmule View Post
I have been trying to find a method to use a module like system in my software.
To be honest, I couldn't follow the rest of your post clearly, but if you want to be able to dynamically load "modules" into your program at runtime, you might want to check out dlopen() and the related family of functions declared in dlfcn.h.
http://www.opengroup.org/onlinepubs/...h/dlfcn.h.html

Hope that help
jason_m is offline   Reply With Quote
Reply

Tags
dynamic loader, ipc, linux, module, shared library

Thread Tools
Display Modes

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Builder C++ large files support for simple C program Murfury C Programming 3 11-23-2007 03:47 PM
Using variables in system() Afro C Programming 8 07-03-2007 12:27 PM
Function (modules) and loop help. GCNDoug C Programming 5 04-07-2007 12:43 AM
My program, anyhelp @licomb C Programming 14 08-14-2001 10:04 PM


All times are GMT -6. The time now is 12:19 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.0 RC2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22