Extending C program to support modules

This is a discussion on Extending C program to support modules within the C Programming forums, part of the General Programming Boards category; Hi everyone, I hope you don't scrutinise me too much based on my post count, but anyway. I have been ...

  1. #1
    Registered User
    Join Date
    Jun 2008
    Posts
    15

    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)

  2. #2
    Registered User
    Join Date
    May 2008
    Posts
    87
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

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

Tags for this Thread


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