Programming :: Garbage Collection In C?

Jan 7, 2010

I was wondering if it is possible to have a garbage collector in C, and would it be too difficult to create?

View 1 Replies


ADVERTISEMENT

Programming :: Eliminate Garbage From Buffer C++

Mar 4, 2010

Code:
char retBuffer[100];
recv(sock , retBuffer ,sizeof(retBuffer) , 0);

if i send a string smaller then my buffer size retBuffer always have garbage of the end of it....what can i do to eliminate tis problem ?

View 2 Replies View Related

Programming :: Implementing A Garbage Collector In C++?

Aug 27, 2009

I'm interested in writing a generational garbage collector in C++. This is for a Python-like programming language project. I have used Boehm's garbage collector before, but I'm worried that it will have noticeable pause times (unacceptable for interactive programs). Since I can't really find any other C++ established GCs out there, I have been thinking of simply writing my own.

However, there are two essential ingredients I need for this:

- Some kind of write barrier mechanism that will notify my collector when something is written to a part of the heap

- A way for me to know the addresses and sizes of the stack, heap and global storage (the root sets)

how to implement write barriers (and how to get the stack, heap and global storage information) on the Linux platform? As an alternative, if you know of C++ GCs other than Boehm, I would also be interested.

View 14 Replies View Related

Programming :: Ncurses Screen Prints Garbage

Feb 9, 2011

I actually have two reasons for posting this. One is to see if there's an actual name for characters like this:Hopefully that will show up correctly for you. If not, it's a little box with four numbers in it, one in each corner. I don't know their name or their reason for showing up, so it's hard to look for help.

My main problem, though, is that I wrote a program that prints some output to a console using ncurses as it runs. These characters show up on the console, seemingly at random, and disturb the whole thing. Sometimes I'll also get sets of characters like "[13;" I'm not printing anything bizarre on there, just strings and floating-point numbers.

View 6 Replies View Related

Programming :: Garbage After Exactly Eight Properly Printed Characters?

Jul 21, 2010

The code below prints garbage if I use puts() but it is fine if I use printf() instead (see sample of output at the bottom of this post). The odd thing is that the mess always starts after exactly eight properly printed characters. That sort of regularity can't be a coincidence, can it? It almost looks like an encoding issue (I'm using UTF-8) but if it really is, then I don't understand why the printf() is unaffected.

Code:
#include <stdio.h>
#include <string.h>
const char *nChars (const char *, int);
int main (int argc, char * argv[]){
char * name ="Count Dracula++";
int len = strlen(name);
if (argv[1] == 0) argv[1]="printf";
printf("--->%d characters", len); .....

View 9 Replies View Related

Programming :: Bash Unset Array Loops GARBAGE?

Jun 27, 2011

Code:

#loop until there are no more files
while [ ${#files[@]} -gt 0 ]; do
for num in `seq 1 ${#files[@]}`; do
wurd=`tail -4 ${files[$num-1]}`

[code].....

Everything works.. but when it has to unset.. it breaks.. it doesnt give an error though.. it just jams the program.

View 7 Replies View Related

Programming :: Make Objects Created With New Garbage-collected

Apr 30, 2011

I read this guide: [URL].. but I still don't understand how to make objects created with new garbage-collected. Could someone explain how or find a link to an explanation?

View 13 Replies View Related

Programming :: Shell Script Network Data Collection Anomaly- Workarounds/changes?

Jun 5, 2010

I have a script that I am using to try to measure network throughput over the ethernet ports. This is at work in order to test the performance of our onboard ethernet ports (planar) versus our pci-e (and daughter) ethernet pluggable cards.The script is very long (and calls other scripts), so I will try to only show the parts that seem to be producing this weird little bug:

Code:
#Robert de Bock's "A shell script to measure network
#throughput on Linux machines" served as the basis for
#this part of the script. Thank you for your help Robert!

[code]...

View 4 Replies View Related

Programming :: Name Of Formula N Things Out Of Collection Of M Things

Jul 22, 2011

I'm working through some problems in a beginners programming book. The author mentions a formula for calculating the number of ways of picking out n things from a collection of m of them:

Code:
/ m m!
| | = -----------
n / n! (m-n)!
But he does not give a name for the formula. Does anyone happen to know what it is called? I need to do some related research.

View 3 Replies View Related

Slackware :: Tell If Have 'garbage' In Root Partition?

Mar 7, 2011

My root partition /dev/sda1 is 24.41 GiB with 10.48 GiB used. How can I tell if I have inadvertently placed a bunch of garbage on this partition? Also, should I, and I use the term loosely, 'move' certain directories to my home partition /dev/sda3? (118.77 GiB with 3.14 GiB used)

Right now I believe that, rightly or wrongly, if I screw up my system, all I need to do is install my Clonezilla image back to /dev/sda1 and I will have a 'mostly' working system. If I 'move' anything out of /dev/sda1 to /dev/sda3, will this hold true? Or am I out to lunch on this assumption anyway?

View 14 Replies View Related

OpenSUSE :: Garbage In Yast2 In Text Mode?

Mar 5, 2011

if I open Yast2 via SSH I see the garbage (code page related issue; similar to this). If I set some other than UTF-8 in PuTTY (KOI8-U, iso-8859 etc) Yast looks good, but then the same problem appears with Midnight Commander. How can I have Yast to use 'right' UTF-8 instead of any legacy code pages? Or how better deal with the situation?

View 2 Replies View Related

General :: Running Git-svn With Cron Results In Garbage

Mar 25, 2010

I've setup a git-svn repo with cron to fetch from the svn repo daily. I have a script to do the fetching, and this is what is invoked by cron. Everything is fine with the repo, and the script works fine when executed manually. However, when it runs under cron, empty files get dropped into the .git directory. The files have names that look like they are some base64 output, e.g. juTrvjP6m8 and kcKf3hu3b4. Two of these files show up for every cron run. I thought these might be commit hashes, but they're not, git-show says it's an unknown revision. I set-up the repo as follows:

[code]...

The last line pushes the repo to a separate (bare) public repo from which others can clone. I'm piping the output from the cron job to a file, which looks like this:

[code]...

The line "fatal: unable to run 'git-svn'" is alarming, but the fetch seems to go ahead anyway. Where are these empty garbage files coming from, and how to stop them? Am I in for bigger problems in the future?

View 1 Replies View Related

Ubuntu Installation :: CD Drive Is Garbage And Won't Run The Installer?

Jan 6, 2010

I am trying to get a new box up. It has XP on one HDD. There is a second HDD, upon which I want to install Ubuntu and dual boot. My problem is that my CD drive is garbage and won't run the installer. Nor do I have any flash drives. Is it possible to install directly from Windows but not "within Windows" persay? If so, how is this done? (I do have Daemon Tools.)

View 2 Replies View Related

Ubuntu :: Some Japanese Text Comes Out As Garbage Characters

Jan 23, 2010

I have installed scim and anthy. Most Japanese characters display, but some websites and files show garbage characters. Is there any way to resolve this?

View 1 Replies View Related

Ubuntu :: Ati X1270 (RS690) Still Garbage Screen?

Apr 30, 2010

With 10.04 final i still have the issue with a very distorted screen. Works with RadeonHD driver but performance is utterly crap so no good solution. Also when adding new panels they become invisible and only a logout and login makes them visible around the border. Errors somehow related? How do i file a bug report?

View 1 Replies View Related

Ubuntu :: Some Japanese Text Comes Out As Garbage Characters?

Nov 1, 2010

I have installed scim and anthy. Most Japanese characters display, but some websites and files show garbage characters.

View 1 Replies View Related

Hardware :: LaserJet 6P Printing Pages Of Garbage

Nov 2, 2009

Inherited an old Laserjet 6P that was working fine XP. No matter which printer driver I use all I get are pages and pages of garbage during the test print. I have tried the hplip, gimp, ljet4 drivers without success. I have tried sending text files from the command line as well (cat /etc/passwd > /dev/lp0) with the same result.

Fedora 11 64
cups 1.4
hplip-3.9
hpijs-3.9

Anyone using this printer with cups 1.4? Any ideas which driver to use?

View 4 Replies View Related

Slackware :: 'less' Command - Prints Garbage When Piped

Mar 5, 2010

When i pipe commands through 'less' in console, i get a load of garbage mixed into the results, and no colors either. Mainly the letters 'Esc' printed a couple of times on each line.

I had been messing about with my bash config files but i can't see anything in there to affect this. If I pipe through 'more' there is no problem, only 'less'.

View 11 Replies View Related

Fedora Installation :: 107_fedora_dont_backfill_bg_none.patch Garbage Graphics?

Feb 13, 2009

Is there any repo to get xserver fixed packages?? see [URL]..

View 2 Replies View Related

OpenSUSE Install :: Garbage Display Before And After Login On Laptop?

Dec 8, 2009

Am running OpenSuSE 11.1 / KDE 3.5 on an Acer Aspire 4730Z laptop. Garbage is displayed on the screen just before and just after the login screen. The garbage sometimes includes vestiges of the taskbar. Suspect some video buffer is not being correctly initialized.

View 1 Replies View Related

OpenSUSE Multimedia :: Flash Is Jerking Replay Is Garbage?

Mar 28, 2011

i installed 11.3 with kde on my wife's computer a couple of months ago, and i am slowly trying to fix the holes in the installation. things that she "can't live without". now i am working on flash. videos and other flash videos in the browser are all jerky, with very poor playback quality as a result. the playback skips forward a couple seconds, then pauses. this appears to be exactly like a bandwidth issue - but it is not. bandwidth is fine, and allowing the vid to download completely before playing makes no difference. i uninstalled all flash stuff, then reinstalled from a standard repo selection that included packman. pretty much oldcpu's recommended list of repos. no change. i've spent hours searching and reading threads, trying to find a gold nugget. one said delete ~/.macromedia and ~/.adobe. did that. no change.

update everything. no change. reboot. no change. somebody mentioned he was having a firefox specific issue with similar symptoms. i try chrome. no change. some ppl seem to connect flash misbehavior with vid driver issues. this box has an ati onboard gpu - ati radeon xpress 200. so i spend some time looking through some threads i turned up regarding updating that - but this leads me to more searching and no answers. i don't know how to tell what driver i have installed for ati, i don't know how to find the kernel config file to see if ati has been built in, and more.

View 6 Replies View Related

Red Hat / Fedora :: Monitor Displays Garbage When Started X Windows?

Apr 20, 2011

Booted up my machine today and when I started x windows, the first dialog box came up fine and then the gui components turn into garbage characters and I then I lose control of the gui and have to reboot.I'm running Centos 5.5.I'm wondering how to diagnose this. Is this a hardware problem of a configurationproblem? Is there a way I can set the video settings back to default values?

View 1 Replies View Related

Server :: Samba Shared Printer Prints Garbage

Jul 28, 2009

Just recently got a few printers connected to the network at my shop and I've managed to get them connected in with samba for the linux clients. Whenever I try to print from one of the clients, the printer will click on and whiz away, but only prints on the first page stuff that looks like this:

Code:
%!PS-Adobe-3.0
%%BoundingBox: 38 24 574 768
%%Title: Enscript Outpu
%%For: User N

It seems to me that the printer isn't processing the postscript data properly (or I'm just not sending it in the right format) but I'm at a loss as to how to go about fixing it.

View 4 Replies View Related

Debian Installation :: SSD - Garbage Collector And Swap Partition / File

Feb 27, 2015

After some years using OS X, I'm returning on Debian on my Macbook Pro in single boot.

I've bought a Samsung SSD (850 EVO 500Go) in order to replace the slow built-in HDD.

But I've earned about the need of repartition of writing operation on that kind of drives, and I'm concerned about swap partition.

I need swap (especially for Darktable, browsers and maybe Steam games), but I wonder if the usual swap partition (even with discard mount option) is really recommandable for SSD drives.

Actually, on Debian wiki and others, the usual recommandation is "if you have enough RAM, don't use swap or minimise swapiness to 1", but using of swap file is not mentioned.

Indeed, if I have only one "big" partition on the SSD drive and TRIM activated, the garbage collector (low level) built in chipet's SSD will optimize SSD life, but I don't know how the low level garbage collection works with multiple partition.

So there is my questions :

- Will SSD garbage collection will preserve the disc use even if I have a 2GB swap partition ?
- Will I'd use a swap file instead of swap partition (I don't really need to hibernate) ?

View 14 Replies View Related

Ubuntu :: Boot Screen Black With Lots Of Pixelated Garbage?

Aug 16, 2010

I tried to install a a custom splash screen using this guide [URL] and got as far changing the settings with Startup Manager. I found out that I didn't have an 'Appearance' tab so I reverted all the changes I've done in the 'Boot Options' tab. I then closed Startup Manager and rebooted back into linux. Now instead of seeing the purple Unbuntu screen, I see a black screen with a lot of pixelated garbage. Why I don't have the necessary tabs in Startup Manager to install a theme? I'm using a Macbook Pro 5,5.

View 4 Replies View Related

Server :: Gnome Terminal Cursor Keys Produce Garbage?

Jun 17, 2011

Ubuntu 10.04 - Gnome Termainal - BASH pressing cursor keys in certain users produces garbage. For example:

pressing up arrow produces: ^[[A
pressing down arrow produces: ^[[B
pressing right arrow produces: ^[[C
pressing left arrow produces: ^[[D

Naturally, I'd like my bash history instead of this. For root and my main user I have no problems. I have a few system users (who don't have a standard home directory) and this seems to occur with those users. For example, my amandabackups user has a home directory of /var/lib/amanda.

View 3 Replies View Related

CentOS 5 :: Anacond - Hangs At Blue Screen Of Garbage / Sort It?

Sep 12, 2009

I'm attempting to install CentOS 5.2 x86_64, on an HP Pavilion/Intel Core Duo.

The DVD boots, anaconda starts, displays blue screen with "Loading usb-storage driver", and then hangs at a blue screen of garbage.

View 6 Replies View Related

SUSE :: Get To Add To The Collection Or Playlist?

May 9, 2010

Can anyone explain in simple schoolboy language (age about 5, or thats how i feel), how I can rip my cds, so not breaking law, and add to playlist.No problem playing them, but how do you get to add to the collection or playlist.

View 1 Replies View Related

Fedora :: Amarok Can't Scan My Collection

Feb 21, 2010

Ok, I stopped using Fedora after the version 9. Today for a change I installed Fedora 12. And now I am in an endless world of troubles.At first I was able to video call friends on msn. But it wasn't working. And then I found this guide and did everything it says. Now it's even worse, audio and video call buttons are greyed out?

Amarok is a critical software for me. No Amarok, no Linux. I installed the amarok's latest version through yum. But amarok can't scan my collection. It keeps giving this error "[ERROR!] Tried to query an uninitialized m_db! ".???

View 14 Replies View Related

Ubuntu :: Database For Music CD Collection?

Feb 20, 2010

I'm looking for a recommendation for an app that will keep details of all my audio CDs. Ideally I'd like it to be able to produce html or xml so that I can check it from anywhere ("Have I got that track?").

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved