Questions tagged [resource-management]

142 questions
1
vote
0 answers

TSQL Limit System Resource Usage Inline?

I already know that you can set the deadlock_priority to -10 if you want to avoid a longer query from completely locking out other queries. What I'm looking to do is a bit different. Is there a way to (inline) specify a limit to the amount of RAM,…
Xenoranger
  • 421
  • 5
  • 22
1
vote
4 answers

sharing a data member with the outside world in a thread-safe manner

I would really appreciate some advise on this matter. e.g. class Foo { TData data; public: TData *getData() { return &data; } // How can we do this in a thread safe manner ? }; So I want to have a mechanism to make getData() thread-safe. I…
1
vote
1 answer

Azure Resource Manager SQL db templates

I am trying to create an ARM templates for Azure SQL DB deployment. I started by exporting template for an existing Azure sql database which was created and configured from portal. However I see quite a few fields which look a bit unfamiliar to me…
shaswata pal
  • 389
  • 3
  • 15
1
vote
2 answers

Graceful handing over resources from initramfs to userspace

There are hardware devices which need userspace suppport, like daemon running and handling parts of interaction not suitable (too complex or policy-related) for kernel space. Running such daemons is easy once you reach userspace -- you can run'em as…
dottedmag
  • 853
  • 6
  • 16
1
vote
3 answers

Program design concerning polymorphism & resource management

I have a class called Widget. This class is abstract and has virtual methods. To avoid object slicing all Widgets are stored as references or pointers. I have several classes with constructors that store internally the widget given to them; thus the…
Anonymous1847
  • 2,568
  • 10
  • 16
1
vote
2 answers

heron Topologies keep running after deactivating

I'm currently working on Heron & Apache Storm for some resource management and scheduling Research. I noticed that after submitting topologies to Heron, they start running and taking resources, but after deactivating them, it appears that they are…
1
vote
0 answers

Java using finalize to add a cleanup task for another thread

I'm using OpenGL in Java and I have to delete external resources (like vbos). The recommended way is to have a Disposable interface. However doing that would require me to have nearly every class dealing with resources implement this interface. And…
torkleyy
  • 1,137
  • 9
  • 26
1
vote
1 answer

top may be showing incorrect memory usage

I am writing a simple C++ program on Mac OS. I have just int main() { int *n = new int[50000000]; } I launch this program in lldb, and put a breakpoint at the line where n is allocated. Then I launch top in another tab, I see that memory usage…
user2048925
  • 63
  • 1
  • 5
1
vote
2 answers

How can I add objects to a scene via button click in Unity?

I would like to know how to use a button click to bring objects to the scene.
1
vote
1 answer

Initialization and release of global resources with spring

In our applications we usually have some resources (utilities) that are used application wide, for example that might be an apache HttpClient, or in my case ConcurrencyUtils which is an utility class that manages all the thread pools for cpu…
vach
  • 10,571
  • 12
  • 68
  • 106
1
vote
2 answers

How to release resources from shared_ptr ResourceManager

I implemented a simple ResourceManager - everything was fine until I tried to implement its destructor for (emergency) clean up(for example in case of fatal exception). I was not able to find a single way to do it: template class…
wondra
  • 3,271
  • 3
  • 29
  • 48
1
vote
3 answers

Variants of stream closing pattern in Java

I often see the following pattern both in Java documentation and in other people's code when dealing with streams: FileInputStream fis = null; try { fis = new FileInputStream("some.file"); // do something useful with fis } finally { if (fis !=…
SnakE
  • 2,355
  • 23
  • 31
1
vote
3 answers

Does C++ have a smart pointer like unique_ptr with a "destruct before constructing" semantics?

Problem Consider this simple class: struct C { C(const char* name) : name(name) { cout << "constructing " << name << endl; } ~C() { cout << "destructing " << name << endl; } string name; }; I would like to…
WaelJ
  • 2,942
  • 4
  • 22
  • 28
1
vote
3 answers

Sharing resources between web requests?

Is there a standard way, in ASP.Net, to share resources between web requests? This is my problem: There is a web service I need to query from the code behind of several pages This web service only allows one logged in session at a time If you log…
Petey B
  • 11,439
  • 25
  • 81
  • 101
1
vote
2 answers

Problem with resources location difference in eclipse and JARs

I wrote a program that is based completely on a single text file: I read the file, store the information, then search the information, etc. So, for the program to work, the file just has to be present and detectable by the program. I use eclipse, so…
user655423
  • 115
  • 1
  • 5