shared

Best way for interprocess communication in C++

烈酒焚心 提交于 2019-11-27 07:13:15
I have two processes one will query other for data.There will be huge amount of queries in a limited time (10000 per second) and data (>100 mb) will be transferred per second.Type of data will be an integral type(double,int) My question is in which way to connect this process? Shared memory , message queue , lpc(Local Procedure call) or others.... And also i want to ask which library you suggest? by the way please do not suggest MPI. edit : under windows xp 32 bit One Word: Boost.InterProcess . If it really needs to be fast, shared memory is the way to go. You nearly have zero overhead as the

Can't create shared library with static inside

荒凉一梦 提交于 2019-11-27 06:28:08
问题 Please help I search throw whole internet but I can't find answer ... C Layer I have created simple function int mean(int, int); and place it in calc_mean.h and initialize it in calc_mean.c here are this two files. calc_mean.c #include "calc_mean.h" int mean(int a, int b) { return (a+b) / 2; } calc_mean.h int mean(int, int); Then I create make file and build archive (.a) file called Test_Archive.a using following make file makefile GCC := C:\Tools\ndk-toolchain\ndk-standalone\bin\arm-linux

Analyzing memory access coalescing of my CUDA kernel

本小妞迷上赌 提交于 2019-11-27 06:20:26
问题 I would like to read (BS_X+1)*(BS_Y+1) global memory locations by BS_x*BS_Y threads moving the contents to the shared memory and I have developed the following code. int i = threadIdx.x; int j = threadIdx.y; int idx = blockIdx.x*BLOCK_SIZE_X + threadIdx.x; int idy = blockIdx.y*BLOCK_SIZE_Y + threadIdx.y; int index1 = j*BLOCK_SIZE_Y+i; int i1 = (index1)%(BLOCK_SIZE_X+1); int j1 = (index1)/(BLOCK_SIZE_Y+1); int i2 = (BLOCK_SIZE_X*BLOCK_SIZE_Y+index1)%(BLOCK_SIZE_X+1); int j2 = (BLOCK_SIZE_X

Can the same DLL data be shared by 2 different processes?

与世无争的帅哥 提交于 2019-11-27 06:16:17
问题 I have two different C# applications that are running at the same time. I would like both of them to be able to access the same "instance" of a DLL (also in C#). The DLL holds some data that I'd like to return to whichever of the two applications is asking for it. My DLL is thread-safe so I was hoping this would be possible but I'm not sure how. Any help or advice would be much appreciated. 回答1: The process space will be different so, for example, global variables in the DLL will be specific

ld: Using -rpath,$ORIGIN inside a shared library (recursive)

倖福魔咒の 提交于 2019-11-27 05:28:50
问题 I just made a basic example of using ld's -rpath option with $ORIGIN here (see 2nd response for a working version). I'm trying to create an example where main.run links to foo.so , which in turn links to bar.so , all using rpath and $ORIGIN . The run-time file-structure is: project/ lib/ dir/ sub/ bar.so foo.so run/ main.run (failing to build) I'm building foo.so using: g++ -c -o obj/foo.o src/foo.cpp -fPIC g++ -shared -o lib/dir/foo.so obj/foo.o -Wl,-soname,foo.so -Wl,-rpath,'$ORIGIN/sub'

Sharing authentication between two web applications

橙三吉。 提交于 2019-11-27 05:24:44
问题 I have a base web site ( Asp.net WebForms application) running under ie. http://localhost:90/ Then I created a new (this time Asp.net MVC ) application and added it under http://localhost:90/mvc/ but not just as a simple virtual folder, but as an application folder by defining a different application pool to run it, compared to the parent application. Since browsers can't know that there are two different application basically on the same domain it would work like: user accesses http:/

Push git changes to a shared network drive

瘦欲@ 提交于 2019-11-27 04:56:20
问题 How can a team of four people use Git (specifically Github for Windows) to push local changes to a shared network drive? Right now (without Git) we have to copy the files from the network drive to our local machine, edit the files, and then re-upload them to the shared network drive. This is a painstaking process that can lead to lots of errors, but it seems like something Git could help us with. Can we simply install Git on the shared drive and go from there? 回答1: Not sure if you found

Access Shared Network Folder

断了今生、忘了曾经 提交于 2019-11-27 03:34:21
问题 I need to access via VBA a folder hosted on a Network File Server. The folder is accessible in writing only via a Service Account (different from normal user accounts) for which I do have username and password. Via the UI I can see that folder and map it as a local drive but in order to access it in writing I need to log off from Windows and logon via the Service Account. Is there any way to access the network folder during a normal user session but hardcoding username and pwd in the VBA code

Can shared library call another shared library?

你说的曾经没有我的故事 提交于 2019-11-27 02:54:01
问题 Can one shared library load and call functions from another shared library? I have Shared library libDsmTestLib.so that use another shared libraries libDsmShared.so and libPINDsmShared.so LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := DsmTestLib LOCAL_SRC_FILES := DSM_Library.cpp LOCAL_LDLIBS := -lDsmShared LOCAL_LDLIBS += -lPINDsmShared include $(BUILD_SHARED_LIBRARY) when I create libDsmTestLib.so and want to use it in my android java application like this: package com

Linux shared library that uses a shared library undefined symbol

拟墨画扇 提交于 2019-11-27 02:00:01
问题 two shared libraries liba.so and libb.so. liba.so uses libb.so. All c files are compiled with -fPIC. Linking uses -shared. When we call dlopen on liba.so it cannot find symbols in libb.so...we get the "undefined symbol" error. We can dlopen libb.so with no errors. We know that liba is finding libb because we don't get a file not found error. We get a file not found error when we delete libb.so. We tried -lutil and no luck. Any ideas???? oh yeah. gcc 4.1.2 update: We use rpath when linking